gn2bp: Generate bofingssl_asm module for x86
This is required to build third_party/boringssl for x86
Test: ./update_results.sh
Change-Id: I3ed81b5a00071e9ebc52bb2b40d9fc0624efc916
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 1b550bc..6e4792e 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -499,6 +499,11 @@
label_without_toolchain = gn_utils.label_without_toolchain(label)
module = re.sub(r'^//:?', '', label_without_toolchain)
module = re.sub(r'[^a-zA-Z0-9_]', '_', module)
+
+ # If it's required to support multi toolchain for more targets, it's better to avoid hardcoding.
+ if label == "//third_party/boringssl:boringssl_asm(//build/toolchain/android:android_clang_x86)":
+ module += "_x86"
+
if not module.startswith(module_prefix):
return module_prefix + module
return module
@@ -1297,6 +1302,13 @@
for target in targets:
create_modules_from_target(blueprint, gn, target)
+ # Currently, multi tool chain is not supported for all targets and create_modules_from_target can
+ # not reach to this target by following the dependency.
+ # So it's required to specify explicitly.
+ create_modules_from_target(blueprint, gn,
+ "//third_party/boringssl:boringssl_asm" +
+ "(//build/toolchain/android:android_clang_x86)")
+
create_java_module(blueprint, gn)
update_jni_registration_module(blueprint, gn)