File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ ENABLE_LANGUAGE(C)
31
31
include (SwiftUtils )
32
32
include (CheckSymbolExists )
33
33
34
- # WebAssembly: hack: use llvm-ar for creating static libraries; Ubuntu's GNU ar doesn't work with wasm-ld
35
- set (CMAKE_AR "${SWIFT_WASM_WASI_SDK_PATH} /bin/llvm-ar" )
36
-
37
34
#
38
35
# User-configurable options that control the inclusion and default build
39
36
# behavior for components which may not strictly be necessary (tools, examples,
@@ -853,6 +850,11 @@ if(swift_build_wasm AND NOT "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WASM")
853
850
# message(FATAL_ERROR "A Darwin or Linux host is required to build the Swift runtime for Android")
854
851
#endif()
855
852
853
+ if ("${CMAKE_HOST_SYSTEM_NAME} " STREQUAL "Linux" )
854
+ # WebAssembly: hack: use llvm-ar for creating static libraries; Ubuntu's GNU ar doesn't work with wasm-ld
855
+ set (CMAKE_AR "${SWIFT_WASM_WASI_SDK_PATH} /bin/llvm-ar" )
856
+ endif ()
857
+
856
858
if ("${SWIFT_SDK_WASM_ARCHITECTURES} " STREQUAL "" )
857
859
set (SWIFT_SDK_WASM_ARCHITECTURES wasm32 )
858
860
endif ()
You can’t perform that action at this time.
0 commit comments