diff options
author | Petr Hosek <phosek@chromium.org> | 2019-05-01 03:30:51 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-05-01 03:30:51 +0000 |
commit | 8bff215cea06b2a2a25fe7680a40bf9f85b78d5d (patch) | |
tree | 2a7024e26398a2bcb71ebcf70e512797fbd3dc2c /cmake/Modules | |
parent | ec9ec0d054a786360bc94a5a3fd481ce829f9f15 (diff) |
[compiler-rt] Pass sysroot and disable pedantic for crtbegin.o/crtend.o
These are needed to make bots happy.
Differential Revision: https://reviews.llvm.org/D61363
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 531d6fd09..8f49f3e7a 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -276,7 +276,10 @@ function(add_compiler_rt_runtime name type) if(type STREQUAL "OBJECT") get_property(cflags_${libname} SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS) if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET) - list(APPEND cflags_${libname} "-target ${CMAKE_C_COMPILER_TARGET}") + list(APPEND cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}") + endif() + if(CMAKE_SYSROOT) + list(APPEND cflags_${libname} "--sysroot=${CMAKE_SYSROOT}") endif() string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}") string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions |