gn2bp: fix host and device support properties
With proper arch support, we now have all the information to do this
properly.
Test: //components/cronet/android:cronet
Change-Id: Iab86261a6a4d775ba5f3b12b2487b7c27096580d
diff --git a/tools/gn2bp/gn_utils.py b/tools/gn2bp/gn_utils.py
index f051421..d1d8319 100644
--- a/tools/gn2bp/gn_utils.py
+++ b/tools/gn2bp/gn_utils.py
@@ -29,8 +29,6 @@
BUILDFLAGS_TARGET = '//gn:gen_buildflags'
GEN_VERSION_TARGET = '//src/base:version_gen_h'
-TARGET_TOOLCHAIN = '//gn/standalone/toolchain:gcc_like_host'
-HOST_TOOLCHAIN = '//gn/standalone/toolchain:gcc_like_host'
LINKER_UNIT_TYPES = ('executable', 'shared_library', 'static_library')
# TODO(primiano): investigate these, they require further componentization.
@@ -155,6 +153,12 @@
self.is_finalized = False
self.arch = dict()
+ def host_supported(self):
+ return 'host' in self.arch
+
+ def device_supported(self):
+ return any([name.startswith('android') for name in self.arch.keys()])
+
def __lt__(self, other):
if isinstance(other, self.__class__):
return self.name < other.name