This repository was archived by the owner on Nov 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -767,15 +767,6 @@ if (MSVC)
767767 foreach (flag ${msvc_warning_flags} )
768768 append ("${flag} " CMAKE_C_FLAGS CMAKE_CXX_FLAGS )
769769 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)
779770endif (MSVC )
780771
781772if (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
292292 Demangle
293293 )
294294
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+
295307set (llvm_system_libs ${system_libs} )
296308
297309# 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