Skip to content

Commit 45c08e7

Browse files
committed
Enable concurrency-deleted-method.swift test for wasip1 (#83236)
The test is only partially enabled: we only check for IR correctness and correct linking. We don't run the tests on WASI yet due to unrelated issues that are going to be resolved separately. # Conflicts: # test/embedded/concurrency-deleted-method.swift # test/lit.cfg
1 parent 7678991 commit 45c08e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

test/embedded/concurrency-deleted-method.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library -module-name main %s -emit-ir | %FileCheck --check-prefix=CHECK-IR %s
3-
// RUN: %target-swiftc_driver -enable-experimental-feature Embedded -parse-as-library -module-name main -Xlinker -lswift_Concurrency -Xlinker -lswift_ConcurrencyDefaultExecutor -Xclang-linker -dead_strip %s -sdk %target-sdk %target-clang-resource-dir-swiftc-opt -wmo -o %t/a.o
4-
// RUN: %target-run %t/a.out | %FileCheck %s
3+
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library -module-name main %s -c -o %t/a.o
4+
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple %target-clang-resource-dir-opt -lswift_Concurrency %target-swift-default-executor-opt -dead_strip
5+
// RUN: if [ %target-os != "wasip1" ]; then %target-run %t/a.out | %FileCheck %s; fi
56

67
// REQUIRES: executable_test
78
// REQUIRES: swift_in_compiler

test/lit.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,7 @@ config.target_static_library_suffix = '.a'
12741274
config.target_env_prefix = ''
12751275
config.target_sdk_libcxx_path = ''
12761276
config.target_clang_resource_dir_opt = ''
1277+
config.target_swift_default_executor_opt = '-lswift_ConcurrencyDefaultExecutor'
12771278

12781279
if run_vendor == 'apple':
12791280
target_specific_module_triple = '{}-apple-{}'.format(
@@ -2051,7 +2052,7 @@ elif kIsWASI:
20512052
config.target_runtime = "native"
20522053
config.target_not_crash = "not"
20532054
config.target_clang_resource_dir_opt = f"-resource-dir {test_resource_dir}/../../../wasi-sysroot/wasm32-wasip1"
2054-
config.target_clang_resource_dir_swiftc_opt = f"-Xclang-linker -resource-dir -Xclang-linker {test_resource_dir}/../../../wasi-sysroot/wasm32-wasip1"
2055+
config.target_swift_default_executor_opt = ''
20552056

20562057
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
20572058

@@ -3029,6 +3030,7 @@ config.substitutions.append(('%llvm-cov', config.llvm_cov))
30293030
config.substitutions.append(('%hmaptool', os.path.join(config.llvm_src_root, '..', 'clang', 'utils', 'hmaptool', 'hmaptool')))
30303031
config.substitutions.append(('%target-not-crash', config.target_not_crash))
30313032
config.substitutions.insert(0, ('%target-clang-resource-dir-opt', config.target_clang_resource_dir_opt))
3033+
config.substitutions.insert(0, ('%target-swift-default-executor-opt', config.target_swift_default_executor_opt))
30323034

30333035
# Set up the host library environment.
30343036
if hasattr(config, 'target_library_path_var'):

0 commit comments

Comments
 (0)