gn2bp: correctly flatten source_sets under linker unit target

Test: none
Change-Id: I23d13c7168a32db8bbb47a326cbadd117da0199c
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index f45a6b6..349723e 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -403,6 +403,9 @@
       elif dep.type == 'source_set':
         target.arch[arch].source_set_deps.add(dep.name)
         target.arch[arch].source_set_deps.update(dep.arch[arch].source_set_deps)
+        # flatten source_set deps
+        if target.is_linker_unit_type():
+          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.
       elif dep.type in ['action', 'action_foreach', 'copy']: