[PATCH] D47606: [compiler-rt] [builtins] Don't build __atomic_load etc. by default.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 13:58:38 PDT 2018


efriedma created this revision.
efriedma added reviewers: t.p.northover, compnerd, jfb, javed.absar.
Herald added subscribers: Sanitizers, mgorny, dberris.

The locks need to be implemented in a unique shared library to work correctly, so they shouldn't be part of libclang_rt.builtins.a, except in specialized scenarios without any dynamically linked code.

Not sure how this hasn't led to any bug reports yet.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D47606

Files:
  lib/builtins/CMakeLists.txt


Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -173,8 +173,8 @@
   trunctfsf2.c)
 
 option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
-  "Skip the atomic builtin (this may be needed if system headers are unavailable)"
-  Off)
+  "Skip the atomic builtin (these should normally be provided by libatomic)"
+  On)
 
 if(NOT FUCHSIA AND NOT COMPILER_RT_BAREMETAL_BUILD)
   set(GENERIC_SOURCES


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47606.149352.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180531/8a8e22b6/attachment.bin>


More information about the llvm-commits mailing list