File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,11 @@ option(SWIFT_REPORT_STATISTICS
369
369
"Create json files which contain internal compilation statistics"
370
370
FALSE )
371
371
372
+ # FIXME(wasm) Reflection tests are temporalily disabled due to lack of linker features
373
+ option (SWIFTWASM_DISABLE_REFLECTION_TEST
374
+ "Disable building swift-reflection-test for WebAssembly build"
375
+ FALSE )
376
+
372
377
#
373
378
# User-configurable experimental options. Do not use in production builds.
374
379
#
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ if(SWIFT_BUILD_SDK_OVERLAY)
27
27
endif ()
28
28
# Currently SwiftReflectionTest cannot be built on Windows, due to
29
29
# dependencies on POSIX symbols
30
- if (SWIFT_INCLUDE_TESTS AND (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" ))
30
+ if (SWIFT_INCLUDE_TESTS AND (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" ) AND NOT SWIFTWASM_DISABLE_REFLECTION_TEST )
31
31
add_subdirectory (SwiftReflectionTest )
32
32
endif ()
33
33
endif ()
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ foreach(SDK ${SWIFT_SDKS})
252
252
set (test_dependencies )
253
253
get_test_dependencies ("${SDK} " test_dependencies )
254
254
255
- if (SWIFT_BUILD_STDLIB AND SWIFT_INCLUDE_TESTS AND NOT ${SDK} STREQUAL "WASI" )
255
+ if (SWIFT_BUILD_STDLIB AND SWIFT_INCLUDE_TESTS AND NOT SWIFTWASM_DISABLE_REFLECTION_TEST )
256
256
# NOTE create a stub BlocksRuntime library that can be used for the
257
257
# reflection tests
258
258
file (WRITE ${test_bin_dir} /Inputs/BlocksRuntime.c
@@ -288,7 +288,7 @@ _Block_release(void) { }\n")
288
288
289
289
endif ()
290
290
291
- if (NOT " ${SDK} " STREQUAL "WASI" )
291
+ if (NOT SWIFTWASM_DISABLE_REFLECTION_TEST )
292
292
# wasm: Avoid to build swift-reflection-test because it uses unsupported linker flags for wasm-ld
293
293
list (APPEND test_dependencies
294
294
"swift-reflection-test${VARIANT_SUFFIX} _signed" )
Original file line number Diff line number Diff line change @@ -2534,6 +2534,7 @@ extra-cmake-options=
2534
2534
-DSWIFT_BUILD_SYNTAXPARSERLIB =FALSE
2535
2535
-DCMAKE_AR =" %(SOURCE_PATH)s/wasi-sdk/bin/llvm-ar"
2536
2536
-DCMAKE_RANLIB =" %(SOURCE_PATH)s/wasi-sdk/bin/llvm-ranlib"
2537
+ -DSWIFTWASM_DISABLE_REFLECTION_TEST =TRUE
2537
2538
2538
2539
[preset: webassembly-macos-target]
2539
2540
@@ -2549,3 +2550,4 @@ extra-cmake-options=
2549
2550
-DSWIFT_BUILD_SYNTAXPARSERLIB =FALSE
2550
2551
-DCMAKE_AR =' /usr/local/opt/llvm/bin/llvm-ar'
2551
2552
-DCMAKE_RANLIB =' /usr/local/opt/llvm/bin/llvm-ranlib'
2553
+ -DSWIFTWASM_DISABLE_REFLECTION_TEST =TRUE
You can’t perform that action at this time.
0 commit comments