From fc247765c2c79e66f87cc12e6da32a6efda9161c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 23 Oct 2014 21:58:36 +0000 Subject: 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 --- cmake/Modules/AddCompilerRT.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmake') 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. -- cgit v1.2.3