gn2bp: Skip extracting common part for source_set
Test: ./update_results.sh
Change-Id: I429cef85ffbb47df0e44970732f223d81e2867c8
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index 3d86213..d9e677a 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -190,6 +190,12 @@
return
self.is_finalized = True
+ # There are targets that depend on source_set only in specific arch.
+ # Currently, source_set is converted to cc_defaults and defaults can not be target specific
+ # So, skip extracting common part and keep all data for each arch
+ if self.type == 'source_set':
+ return
+
# Target contains the intersection of arch-dependent properties
self.sources = set.intersection(*[arch.sources for arch in self.arch.values()])
self.cflags = set.intersection(*[arch.cflags for arch in self.arch.values()])