From ea701b37905c4e3c8eda9932224e013d97b4ccea Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 2 Aug 2016 15:19:26 -0700 Subject: [PATCH] Only check arch tag if we have *any* arch tags. With the introduction of new tags for ndk_library, we'll have a lot of tags that aren't architecture tags. If we have something tagged `introduced=21`, it should be in all architectures. Change-Id: Ib67f07db14625f6903919c181050316eb183bed5 --- libc/tools/genversion-scripts.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libc/tools/genversion-scripts.py b/libc/tools/genversion-scripts.py index e6c8053f5..53f4db4d5 100755 --- a/libc/tools/genversion-scripts.py +++ b/libc/tools/genversion-scripts.py @@ -33,6 +33,15 @@ bionic_libc_root = os.path.join(os.environ["ANDROID_BUILD_TOP"], "bionic/libc") warning = "Generated by %s. Do not edit." % script_name +def has_arch_tags(tags): + for arch in all_arches: + if arch in tags: + return True + if 'nobrillo' in tags: + return True + return False + + class VersionScriptGenerator(object): def run(self): @@ -52,7 +61,7 @@ class VersionScriptGenerator(object): index = line.find("#") if index != -1: tags = line[index+1:].split() - if arch not in tags: + if arch not in tags and has_arch_tags(tags): continue if brillo and "nobrillo" in tags: has_nobrillo = True -- 2.11.0