android: base: Fix build adding extra -latomic

We don't use use_sysroot=true, but without it -latomic is added
to is_android.
This commit is contained in:
klzgrad 2022-05-03 01:01:06 +08:00
parent 6b0e4e5a8a
commit a278c82ec0

View File

@ -1099,7 +1099,7 @@ component("base") {
# Needed for <atomic> if using newer C++ library than sysroot, except if # Needed for <atomic> if using newer C++ library than sysroot, except if
# building inside the cros_sdk environment - use host_toolchain as a # building inside the cros_sdk environment - use host_toolchain as a
# more robust check for this. # more robust check for this.
if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && if (!use_sysroot && (is_chromeos || (is_linux && !is_castos)) &&
host_toolchain != "//build/toolchain/cros:host") { host_toolchain != "//build/toolchain/cros:host") {
libs += [ "atomic" ] libs += [ "atomic" ]
} }