[compiler-rt] r344751 - [compiler-rt] Don't explicitly set CMAKE_CXX_FLAGS.

Dan Albert via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 18 11:04:29 PDT 2018


Author: danalbert
Date: Thu Oct 18 11:04:28 2018
New Revision: 344751

URL: http://llvm.org/viewvc/llvm-project?rev=344751&view=rev
Log:
[compiler-rt] Don't explicitly set CMAKE_CXX_FLAGS.

Summary:
C++ flags should not be used for not-C++ files as it may trigger
-Werror=unused-command-line-argument. CMake will use CMAKE_C_FLAGS,
CMAKE_CXX_FLAGS, and CMAKE_ASM_FLAGS as appropriate implicitly, so
this does not need to be explicitly handled here.

This change depends on https://reviews.llvm.org/D53301, since one of
the builders depended on this behavior because it was not configuring
CMAKE_ASM_FLAGS.

Reviewers: eugenis, vitalybuka

Reviewed By: eugenis, vitalybuka

Subscribers: dberris, mgorny, delcypher, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D53335

Modified:
    compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake

Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=344751&r1=344750&r2=344751&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Thu Oct 18 11:04:28 2018
@@ -77,7 +77,7 @@ function(add_compiler_rt_object_librarie
     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")




More information about the llvm-commits mailing list