gn2bp: correctly flatten source_sets under linker unit target

Test: none
Change-Id: I23d13c7168a32db8bbb47a326cbadd117da0199c
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 07b4e11..4bf6efb 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -1283,19 +1283,11 @@
           if module.type not in ["cc_object"]:
             module.target[arch_name].export_generated_headers.update(
               dep_module.genrule_headers)
-      else:
-        raise Error('Unsupported arch-specific dependency %s of target %s with type %s' %
-                    (dep_module.name, target.name, dep_module.type))
-    for dep_name in arch.source_set_deps:
-      dep_module = create_modules_from_target(blueprint, gn, dep_name)
-      if dep_module.type == 'cc_object':
-        if module.type != 'cc_object':
-          # We only want to bubble up cc_objects for modules that are not cc_objects
-          # otherwise they'd be recompiled and that would cause multiple symbol redefinitions.
-          if dep_module.has_input_files():
-            # Only add it as part of srcs if the dep_module has input files otherwise
-            # this would throw an error.
-            module.target[arch_name].srcs.add(":" + dep_module.name)
+      elif dep_module.type == 'cc_object':
+        if dep_module.has_input_files():
+          # Only add it as part of srcs if the dep_module has input files otherwise
+          # this would throw an error.
+          module.target[arch_name].srcs.add(":" + dep_module.name)
       else:
         raise Error('Unsupported arch-specific dependency %s of target %s with type %s' %
                     (dep_module.name, target.name, dep_module.type))