@@ -125,17 +125,6 @@ function(_add_variant_c_compile_link_flags)
125
125
"-B" "${SWIFT_ANDROID_PREBUILT_PATH} /arm-linux-androideabi/bin/" )
126
126
endif ()
127
127
128
- if ("${CFLAGS_SDK} " STREQUAL "WINDOWS" )
129
- list (APPEND result "-DLLVM_ON_WIN32" )
130
- list (APPEND result "-D_CRT_SECURE_NO_WARNINGS" )
131
- list (APPEND result "-D_CRT_NONSTDC_NO_WARNINGS" )
132
- # TODO(compnerd) permit building for different families
133
- list (APPEND result "-D_CRT_USE_WINAPI_FAMILY_DESKTOP_APP" )
134
- # TODO(compnerd) handle /MT
135
- list (APPEND result "-D_DLL" )
136
- list (APPEND result "-fms-compatibility-version=1900" )
137
- endif ()
138
-
139
128
if (IS_DARWIN)
140
129
# Check if there's a specific OS deployment version needed for this invocation
141
130
if ("${CFLAGS_SDK} " STREQUAL "OSX" )
@@ -233,6 +222,17 @@ function(_add_variant_c_compile_flags)
233
222
list (APPEND result -fno-pic)
234
223
endif ()
235
224
225
+ if ("${CFLAGS_SDK} " STREQUAL "WINDOWS" )
226
+ list (APPEND result "-DLLVM_ON_WIN32" )
227
+ list (APPEND result "-D_CRT_SECURE_NO_WARNINGS" )
228
+ list (APPEND result "-D_CRT_NONSTDC_NO_WARNINGS" )
229
+ # TODO(compnerd) permit building for different families
230
+ list (APPEND result "-D_CRT_USE_WINAPI_FAMILY_DESKTOP_APP" )
231
+ # TODO(compnerd) handle /MT
232
+ list (APPEND result "-D_DLL" )
233
+ list (APPEND result "-fms-compatibility-version=1900" )
234
+ endif ()
235
+
236
236
if (CFLAGS_ENABLE_ASSERTIONS)
237
237
list (APPEND result "-UNDEBUG" )
238
238
else ()
0 commit comments