gn2bp: remove is_third_party_dep

This is not used anymore.

Test: //components/cronet/android:cronet
Change-Id: Ie6d21f93e44348b51732b6030de315e8c67db52a
This commit is contained in:
Patrick Rohr
2022-11-16 23:04:05 -08:00
parent 5f55226309
commit f1004372e6

View File

@@ -144,13 +144,6 @@ class GnParser(object):
self.transitive_proto_deps = set() self.transitive_proto_deps = set()
self.transitive_static_libs_deps = set() self.transitive_static_libs_deps = set()
# Deps on //gn:xxx have this flag set to True. These dependencies
# are special because they pull third_party code from buildtools/.
# We don't want to keep recursing into //buildtools in generators,
# this flag is used to stop the recursion and create an empty
# placeholder target once we hit //gn:protoc or similar.
self.is_third_party_dep_ = False
# TODO: come up with a better way to only run this once. # TODO: come up with a better way to only run this once.
# is_finalized tracks whether finalize() was called on this target. # is_finalized tracks whether finalize() was called on this target.
self.is_finalized = False self.is_finalized = False
@@ -338,9 +331,7 @@ class GnParser(object):
# Recurse in dependencies. # Recurse in dependencies.
for gn_dep_name in desc.get('deps', []): for gn_dep_name in desc.get('deps', []):
dep = self.parse_gn_desc(gn_desc, gn_dep_name) dep = self.parse_gn_desc(gn_desc, gn_dep_name)
if dep.is_third_party_dep_: if dep.type == 'proto_library':
target.deps.add(dep.name)
elif dep.type == 'proto_library':
target.proto_deps.add(dep.name) target.proto_deps.add(dep.name)
target.transitive_proto_deps.add(dep.name) target.transitive_proto_deps.add(dep.name)
target.proto_paths.update(dep.proto_paths) target.proto_paths.update(dep.proto_paths)