forked from OSchip/llvm-project
[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. llvm-svn: 280416
This commit is contained in:
parent
c0f18172f5
commit
90646fe815
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue