gn build: Pass -fno-emulated-tls when targeting Android.
authorPeter Collingbourne <peter@pcc.me.uk>
Sat, 18 Mar 2023 00:05:46 +0000 (17:05 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Sat, 18 Mar 2023 00:28:40 +0000 (17:28 -0700)
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

llvm/utils/gn/build/toolchain/target_flags.gni

index 92da877..a8521fe 100644 (file)
@@ -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++",