gn2bp: Remove empty srcs cc_object from blueprint
* This was failing the pre-submits are cc_objects are compilable modules but they failed to compile due to empty srcs. However, this didn't affect the compilation of Cronet as the empty cc_objects are never in the path of compilation of Cronet because their attributes are propagated up the tree.
Test: m
Change-Id: I7cc87d53d4f460ef4958d5ecfb23ac28662fdbdc
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index fa624b1..e5d2bf4 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -412,6 +412,8 @@
target.arch[arch].source_set_deps.update(dep.arch[arch].source_set_deps)
# flatten source_set deps
if target.is_linker_unit_type():
+ # This ensure that all transitive source set dependencies are
+ # propagated upward to the linker units.
target.arch[arch].deps.update(target.arch[arch].source_set_deps)
elif dep.type == 'group':
target.update(dep, arch) # Bubble up groups's cflags/ldflags etc.