Fix OPENSSL_NO_ASM definition in bazel.

https://boringssl-review.googlesource.com/c/boringssl/+/51265 broke
Linux and macOS platforms on architectures where we don't build
assembly. OPENSSL_NO_ASM needs to match the assembly selector.

While I'm here, remove the OPENSSL_C11_ATOMIC comment. We autodetect
atomics these days, so the flag is only useful if you want to force it.

Change-Id: I1f20f7577b5ca7e208dc90fb46a93b20da864ec5
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/51305
Reviewed-by: Piotr Sikora <piotrsikora@google.com>
Reviewed-by: Adam Langley <agl@google.com>
fips-20220613
David Benjamin 3 years ago committed by Adam Langley
parent c5179c6930
commit ac3f4fb8e1
  1. 20
      util/BUILD.toplevel

@ -80,11 +80,6 @@ posix_copts = [
"-Wwrite-strings",
"-Wshadow",
"-fno-common",
# Modern build environments should be able to set this to use atomic
# operations for reference counting rather than locks. However, it's
# known not to work on some Android builds.
# "-DOPENSSL_C11_ATOMIC",
]
linux_copts = posix_copts + [
@ -97,13 +92,11 @@ linux_copts = posix_copts + [
boringssl_copts = select({
"@platforms//os:linux": linux_copts,
"@platforms//os:macos": posix_copts,
"@platforms//os:windows": [
"-DWIN32_LEAN_AND_MEAN",
"-DOPENSSL_NO_ASM",
],
"//conditions:default": ["-DOPENSSL_NO_ASM"],
"@platforms//os:windows": ["-DWIN32_LEAN_AND_MEAN"],
"//conditions:default": [],
})
# These selects must be kept in sync.
crypto_sources_asm = select({
":linux_aarch64": crypto_sources_linux_aarch64,
":linux_ppc64le": crypto_sources_linux_ppc64le,
@ -111,6 +104,13 @@ crypto_sources_asm = select({
":macos_x86_64": crypto_sources_mac_x86_64,
"//conditions:default": [],
})
boringssl_copts += select({
":linux_aarch64": [],
":linux_ppc64le": [],
":linux_x86_64": [],
":macos_x86_64": [],
"//conditions:default": ["-DOPENSSL_NO_ASM"],
})
# For C targets only (not C++), compile with C11 support.
posix_copts_c11 = [

Loading…
Cancel
Save