From e28988ecaa5e72523a982915084c9422e495116d Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 4 Aug 2023 14:21:43 -0700 Subject: [PATCH] Disable assembly for Android's darwin build e4acd6cb568214b1c7db4e59ce54ea2e1deae1f5 enabled assembly for more platforms on Android, but the way Android's FIPS build is set up, we currently require ld -r to work on any platform with assembly. See b/294399371. This should be fixable with more time spent on the Android build (and possibly missing features added to Soong, as Soong is quite limited), but as we've never had assembly working here, just restore the old state of things. Change-Id: I8f4e66979a003a5692389ef7e127c8d9f1630773 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62165 Reviewed-by: Adam Langley Commit-Queue: David Benjamin --- util/generate_build_files.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/generate_build_files.py b/util/generate_build_files.py index 07bfc0f76..d0c01d580 100644 --- a/util/generate_build_files.py +++ b/util/generate_build_files.py @@ -152,14 +152,14 @@ class Android(object): if asm_files: blueprint.write(' target: {\n') - # Only emit asm for non-Windows. On Windows, BoringSSL requires NASM, - # which is not available in AOSP. Note that, despite the name, - # "not_windows" covers only non-Windows host devices. - blueprint.write(' android: {\n') + # Only emit asm for Linux. On Windows, BoringSSL requires NASM, which is + # not available in AOSP. On Darwin, the assembly works fine, but it + # conflicts with Android's FIPS build. See b/294399371. + blueprint.write(' linux: {\n') blueprint.write(' srcs: %s_asm,\n' % name) blueprint.write(' },\n') - blueprint.write(' not_windows: {\n') - blueprint.write(' srcs: %s_asm,\n' % name) + blueprint.write(' darwin: {\n') + blueprint.write(' cflags: ["-DOPENSSL_NO_ASM"],\n') blueprint.write(' },\n') blueprint.write(' windows: {\n') blueprint.write(' cflags: ["-DOPENSSL_NO_ASM"],\n')