diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-10-23 21:58:36 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-10-23 21:58:36 +0000 |
commit | fc247765c2c79e66f87cc12e6da32a6efda9161c (patch) | |
tree | c96397461a30b1581b86b975d6934bea76b950bc /cmake | |
parent | b75cf82e613700eb4e48e6e7f9f2199f62cd9d72 (diff) |
Do not set linker flags for MSVC; they are not the same thing as compiler flags. Note, this is already done in the add_compiler_rt_test test_suite function.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index aafccd47d..95eacd0b9 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -52,8 +52,12 @@ macro(add_compiler_rt_runtime name arch type) # Setup compile flags and definitions. set_target_compile_flags(${name} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) - set_target_link_flags(${name} - ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + if (NOT MSVC) + # We do not want any custom link flags set on MSVC; especially not the + # compiler flags, as with other compilers. + set_target_link_flags(${name} + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + endif() set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) # Setup correct output directory in the build tree. |