Skip to content

Commit c738783

Browse files
committed
Windows: fix error D8016: '/O2' and '/RTC1' command-line options are incompatible
1 parent 8109fd9 commit c738783

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ endif()
119119

120120
# Optimize test utilities by default.
121121
if(MSVC)
122-
set_target_properties(FileCheck PROPERTIES COMPILE_FLAGS "${LLVM_DEFINITIONS} -w /O2 /GL /MT")
122+
string(REGEX REPLACE "/RTC[^ ]*" "" LLVM_DEFINITIONS "${LLVM_DEFINITIONS}") # Remove /RTC flags
123+
set_target_properties(FileCheck PROPERTIES COMPILE_FLAGS "${LLVM_DEFINITIONS} /w /O2 /GL /MT")
123124
set_target_properties(libcx PROPERTIES COMPILE_FLAGS "/MT")
124125
set_target_properties(cx PROPERTIES COMPILE_FLAGS "/MT")
125126
else()

0 commit comments

Comments
 (0)