File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -272,31 +272,23 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB AND SWIFT_SHOULD_BUILD_EMBEDDED_CONCURRENC
272
272
list (GET list 1 mod )
273
273
list (GET list 2 triple )
274
274
275
+ set (extra_c_compile_flags )
276
+ set (extra_swift_compile_flags )
277
+
275
278
if (SWIFT_HOST_VARIANT STREQUAL "linux" )
276
279
if (NOT "${mod} " MATCHES "-linux-gnu$" )
277
280
continue ()
278
281
endif ()
279
- set (extra_c_compile_flags )
280
- set (extra_swift_compile_flags )
281
282
elseif (SWIFT_HOST_VARIANT STREQUAL "macosx" )
282
- if (NOT "${mod} " MATCHES "-macos$" )
283
- continue ()
284
- endif ()
285
- if ("${mod} " MATCHES "riscv" )
286
- continue ()
287
- endif ()
288
- if ("${mod} " MATCHES "armv6m" )
283
+ if (NOT "${mod} " MATCHES "x86_64|arm64|arm64e|armv7|armv7m|armv7em" )
289
284
continue ()
290
285
endif ()
291
286
292
- if ("${mod} " MATCHES "-macos$" )
293
- set (extra_c_compile_flags -ffreestanding -stdlib=libc++ )
294
- set (extra_swift_compile_flags -Xcc -ffreestanding )
287
+ if (NOT "${mod} " MATCHES "-apple-" OR "${mod} " MATCHES "-none-macho" )
288
+ # Host is macOS with a macOS SDK. To be able to build the C++ Concurrency runtime for non-Darwin targets using the macOS SDK,
289
+ # we need to pass some extra flags and search paths.
290
+ set (extra_c_compile_flags -stdlib=libc++ -isystem${SWIFT_SDK_OSX_PATH}/usr/include/c++/v1 -isystem${SWIFT_SDK_OSX_PATH}/usr/include -D__APPLE__ )
295
291
endif ()
296
-
297
- elseif (SWIFT_HOST_VARIANT STREQUAL "wasi" )
298
- set (extra_c_compile_flags )
299
- set (extra_swift_compile_flags )
300
292
endif ()
301
293
302
294
set (SWIFT_SDK_embedded_THREADING_PACKAGE none )
You can’t perform that action at this time.
0 commit comments