summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2018-04-11 14:56:35 +0000
committerAaron Smith <aaron.smith@microsoft.com>2018-04-11 14:56:35 +0000
commit26e37831a7a6c69bd2dda84fdc91554a428775cf (patch)
tree4d1ee34e39d7a3f185ba3c3e12665f8dd1a28c01 /cmake
parent8170858c992beee85259235891141370c4acfc07 (diff)
[cmake] Remove duplicate command line options from build
CMAKE_CXX_FLAGS was added twice to the command line. This causes the command line options to be doubled which works until it doesn't as not all options can be specified twice. For example, clang-cl foo.c /GS- /GS- -mllvm -small-loop-cost=1 -mllvm -small-loop-cost=1 clang (LLVM option parsing): for the -small-loop-cost option: may only occur zero or one times! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 2383670a9..a6a45f674 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -63,8 +63,8 @@ function(add_compiler_rt_object_libraries name)
list(REMOVE_ITEM target_flags "-msse3")
endif()
- set_target_compile_flags(${libname}
- ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${target_flags})
+ set_target_compile_flags(${libname} ${extra_cflags_${libname}} ${target_flags})
+
set_property(TARGET ${libname} APPEND PROPERTY
COMPILE_DEFINITIONS ${LIB_DEFS})
set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")