[compiler-rt] r280416 - [CMake] Add option (defaulted off) to exclude atomic.c
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 14:05:50 PDT 2016
Author: cbieneman
Date: Thu Sep 1 16:05:49 2016
New Revision: 280416
URL: http://llvm.org/viewvc/llvm-project?rev=280416&view=rev
Log:
[CMake] Add option (defaulted off) to exclude atomic.c
The atomic builtin source is problematic when cross-compiling builtins because it requires a variable and sometimes large set of system headers. This option allows users to optionally prevent it from being built.
Modified:
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=280416&r1=280415&r2=280416&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Thu Sep 1 16:05:49 2016
@@ -164,7 +164,11 @@ set(GENERIC_SOURCES
umodsi3.c
umodti3.c)
-if(COMPILER_RT_HAS_ATOMIC_KEYWORD)
+option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
+ "Skip the atomic builtin (this may be needed if system headers are unavailable)"
+ Off)
+
+if(COMPILER_RT_HAS_ATOMIC_KEYWORD AND NOT COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN)
set(GENERIC_SOURCES
${GENERIC_SOURCES}
atomic.c)
More information about the llvm-commits
mailing list