File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -767,15 +767,6 @@ if (MSVC)
767
767
foreach (flag ${msvc_warning_flags} )
768
768
append ("${flag} " CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
769
769
endforeach (flag)
770
-
771
- if (BUILD_COMPILER_FOR_DRIVER)
772
- string (REPLACE "-wd4146" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
773
- string (REPLACE "-wd4146" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
774
- string (REPLACE "-wd4244" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
775
- string (REPLACE "-wd4244" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
776
- string (REPLACE "-wd4267" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
777
- string (REPLACE "-wd4267" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
778
- endif (BUILD_COMPILER_FOR_DRIVER)
779
770
endif (MSVC )
780
771
781
772
if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
Original file line number Diff line number Diff line change @@ -292,6 +292,18 @@ add_llvm_component_library(LLVMSupport
292
292
Demangle
293
293
)
294
294
295
+ if (BUILD_COMPILER_FOR_DRIVER)
296
+ get_target_property (CURRENT_COMPILE_OPTIONS LLVMSupport COMPILE_OPTIONS)
297
+ message (STATUS "Current compile options: ${CURRENT_COMPILE_OPTIONS} " )
298
+ string (REPLACE "/wd4146" "" NEW_COMPILE_OPTIONS "${CURRENT_COMPILE_OPTIONS} " )
299
+ string (REPLACE "/wd4244" "" NEW_COMPILE_OPTIONS "${NEW_COMPILE_OPTIONS} " )
300
+ string (REPLACE "/wd4267" "" NEW_COMPILE_OPTIONS "${NEW_COMPILE_OPTIONS} " )
301
+ string (REPLACE ";;" ";" NEW_COMPILE_OPTIONS "${NEW_COMPILE_OPTIONS} " )
302
+ set_target_properties (LLVMSupport PROPERTIES COMPILE_OPTIONS "${NEW_COMPILE_OPTIONS} " )
303
+ get_target_property (NEW_COMPILE_OPTIONS LLVMSupport COMPILE_OPTIONS)
304
+ message (STATUS "New compile options: ${NEW_COMPILE_OPTIONS} " )
305
+ endif ()
306
+
295
307
set (llvm_system_libs ${system_libs} )
296
308
297
309
# This block is only needed for llvm-config. When we deprecate llvm-config and
You can’t perform that action at this time.
0 commit comments