From: Peter Collingbourne Date: Sat, 18 Mar 2023 00:05:46 +0000 (-0700) Subject: gn build: Pass -fno-emulated-tls when targeting Android. X-Git-Tag: upstream/17.0.6~14378 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=659da71a406080b72c3882c491627ae4028b5675;p=platform%2Fupstream%2Fllvm.git gn build: Pass -fno-emulated-tls when targeting Android. Matches the CMake build: https://github.com/llvm/llvm-project/blob/93c1a5f3ddd41e0ec09f38ab0045bd5e92199fd5/compiler-rt/CMakeLists.txt#L343 (we always use API level 29). Differential Revision: https://reviews.llvm.org/D146341 --- diff --git a/llvm/utils/gn/build/toolchain/target_flags.gni b/llvm/utils/gn/build/toolchain/target_flags.gni index 92da877..a8521fe 100644 --- a/llvm/utils/gn/build/toolchain/target_flags.gni +++ b/llvm/utils/gn/build/toolchain/target_flags.gni @@ -14,6 +14,7 @@ if (current_os == "android") { "--target=$llvm_current_triple", "--sysroot=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64/sysroot", "--gcc-toolchain=$android_ndk_path/toolchains/llvm/prebuilt/linux-x86_64", + "-fno-emulated-tls", ] target_ldflags += [ "-static-libstdc++",