summaryrefslogtreecommitdiffstats
path: root/compiler-rt/cmake/Modules/AddCompilerRT.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/cmake/Modules/AddCompilerRT.cmake')
-rw-r--r--compiler-rt/cmake/Modules/AddCompilerRT.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index aafccd47ddc..95eacd0b9bb 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/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.
OpenPOWER on IntegriCloud