[PATCH] D146341: gn build: Pass -fno-emulated-tls when targeting Android.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 17:08:02 PDT 2023


pcc created this revision.
pcc added reviewers: hctim, thakis, aeubanks.
Herald added a subscriber: danielkiss.
Herald added a project: All.
pcc requested review of this revision.
Herald added a project: LLVM.

Matches the CMake build:
https://github.com/llvm/llvm-project/blob/93c1a5f3ddd41e0ec09f38ab0045bd5e92199fd5/compiler-rt/CMakeLists.txt#L343
(we always use API level 29).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146341

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


Index: llvm/utils/gn/build/toolchain/target_flags.gni
===================================================================
--- llvm/utils/gn/build/toolchain/target_flags.gni
+++ llvm/utils/gn/build/toolchain/target_flags.gni
@@ -14,6 +14,7 @@
     "--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++",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146341.506236.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230318/bd2ca51b/attachment.bin>


More information about the llvm-commits mailing list