File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 33
44// RUN: %target-swift-frontend -mergeable-symbols -num-threads 2 -O -c -emit-module -o %t/MyModule.o %t/MyModule.swift -enable-experimental-feature Embedded -parse-as-library
55// RUN: %target-swift-frontend -mergeable-symbols -num-threads 2 -O -c -o %t/MainA.o -o %t/MainB.o %t/MainA.swift %t/MainB.swift -I %t -enable-experimental-feature Embedded -parse-as-library
6- // RUN: %target-clang %t/MainA.o %t/MainB.o %t/MyModule.o -o %t/a.out
6+ // RUN: %target-clang %linux_rng_support_c_if_needed % t/MainA.o %t/MainB.o %t/MyModule.o -o %t/a.out
77// RUN: %target-run %t/a.out | %FileCheck %s
88
99// REQUIRES: swift_in_compiler
Original file line number Diff line number Diff line change @@ -28,3 +28,9 @@ if config.available_features.intersection(set(supported_test_os_list)) == set():
2828config.environment = dict(config.environment)
2929if ' SWIFT_USE_OLD_DRIVER' in config.environment: del config.environment[' SWIFT_USE_OLD_DRIVER' ]
3030if ' SWIFT_AVOID_WARNING_USING_OLD_DRIVER' in config.environment: del config.environment[' SWIFT_AVOID_WARNING_USING_OLD_DRIVER' ]
31+
32+ # (5) Provide some useful substitutions to simplify writing tests that work across platforms (macOS, Linux, etc.)
33+ if " OS=linux-gnu" in config.available_features:
34+ config.substitutions.append((" %linux_rng_support_c_if_needed" , " %S/Inputs/linux-rng-support.c" ))
35+ else:
36+ config.substitutions.append((" %linux_rng_support_c_if_needed" , " " ))
You can’t perform that action at this time.
0 commit comments