[PATCH] D42398: [cmake] Remove duplicate CMAKE_CXX_FLAGS.

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 16:11:16 PST 2018


hintonda created this revision.
hintonda added a reviewer: beanz.
Herald added subscribers: Sanitizers, llvm-commits, mgorny.

`set_target_compile_flags()` ultimately sets COMPILE_FLAGS which are
added to CMAKE_CXX_FLAGS in the compile rule, so passing
CMAKE_CXX_FLAGS causes them to be duplicated.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42398

Files:
  cmake/Modules/AddCompilerRT.cmake


Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -64,7 +64,7 @@
     endif()
 
     set_target_compile_flags(${libname}
-      ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${target_flags})
+      ${extra_cflags_${libname}} ${target_flags})
     set_property(TARGET ${libname} APPEND PROPERTY
       COMPILE_DEFINITIONS ${LIB_DEFS})
     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42398.130981.patch
Type: text/x-patch
Size: 553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/736fc54e/attachment.bin>


More information about the llvm-commits mailing list