Skip to content

Commit ad15f44

Browse files
authored
[CMake] correctly apply -fcf-runtime-abi=swift on Windows (#5004)
1 parent 082b0dc commit ad15f44

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,23 @@ list(APPEND _Foundation_common_build_flags
112112
"-Wno-unused-function"
113113
"-Wno-microsoft-enum-forward-reference"
114114
"-Wno-int-conversion"
115-
"-fcf-runtime-abi=swift"
116115
"-fblocks")
117116

118117
if(NOT "${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
119118
list(APPEND _Foundation_common_build_flags
120119
"-fconstant-cfstrings"
121120
"-fdollars-in-identifiers"
122-
"-fno-common")
121+
"-fno-common"
122+
"-fcf-runtime-abi=swift")
123123

124124
if(NOT CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
125125
list(APPEND _Foundation_common_build_flags
126126
"-fexceptions")
127127
endif()
128128
else()
129129
list(APPEND _Foundation_common_build_flags
130-
"/EHsc")
130+
"/EHsc"
131+
"/clang:-fcf-runtime-abi=swift")
131132
endif()
132133

133134
if(CMAKE_BUILD_TYPE STREQUAL Debug)

0 commit comments

Comments
 (0)