Skip to content

Commit 5e8054f

Browse files
committed
Use a preset for the build-script invocation used by run_sk_stress_test
The hard-coded `build-script` invocation is gross and also didn’t build the new driver, which lead to issues. Use a preset based on the source compat suite presets instead. Effectively, this will add the following arguments to the `build-script` invocation. `--llvm-install-components` and `--swift-install-components` just show the components the newly added components. ``` --cross-compile-hosts=macosx-arm64 --install-llvm \ --install-swift-driver \ --llvm-install-components=clang;clang-resource-headers;compiler-rt;clang-features-file --swift-driver \ --swift-install-components=back-deployment;libexec ```
1 parent 2ef6098 commit 5e8054f

File tree

1 file changed

+18
-39
lines changed

1 file changed

+18
-39
lines changed

run_sk_stress_test

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -195,49 +195,28 @@ def execute_runner(workspace: str, args: argparse.Namespace) -> bool:
195195
return passed
196196

197197

198+
def get_preset_name(args):
199+
build_type = ''
200+
if args.debug:
201+
build_type = build_type + 'D'
202+
else:
203+
build_type = build_type + 'R'
204+
205+
if args.assertions:
206+
build_type = build_type + 'A'
207+
208+
return f'sourcekit_stress_test_macos_{build_type}'
209+
198210
def build_swift_toolchain(workspace: str, args: argparse.Namespace) -> None:
199211
build_command = [
200212
os.path.join(workspace, 'swift/utils/build-script'),
201-
'--debug' if args.debug else '--release',
202-
'--assertions' if args.assertions else '--no-assertions',
203-
'--build-ninja',
204-
'--llbuild',
205-
'--swiftpm',
206-
'--swiftsyntax',
207-
'--skstresstester',
208-
'--ios',
209-
'--tvos',
210-
'--watchos',
211-
'--skip-build-benchmarks',
212-
'--build-subdir=compat_macos',
213-
'--compiler-vendor=apple',
214-
'--',
215-
'--darwin-install-extract-symbols',
216-
'--darwin-toolchain-alias=swift',
217-
'--darwin-toolchain-bundle-identifier=org.swift.compat-macos',
218-
'--darwin-toolchain-display-name-short=Swift Development Snapshot',
219-
'--darwin-toolchain-display-name=Swift Development Snapshot',
220-
'--darwin-toolchain-name=swift-DEVELOPMENT-SNAPSHOT',
221-
'--darwin-toolchain-version=3.999.999',
222-
'--install-llbuild',
223-
'--install-swift',
224-
'--install-swiftpm',
225-
'--install-swiftsyntax',
226-
'--install-skstresstester',
227-
'--install-destdir={}/build/compat_macos/install'.format(workspace),
228-
'--install-prefix=/toolchain/usr',
229-
'--install-symroot={}/build/compat_macos/symroot'.format(workspace),
230-
'--installable-package={}/build/compat_macos/root.tar.gz'.format(workspace),
231-
'--llvm-install-components=libclang;libclang-headers;dsymutil',
232-
'--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers',
233-
'--symbols-package={}/build/compat_macos/root-symbols.tar.gz'.format(workspace),
234-
'--verbose-build',
235-
'--reconfigure',
213+
f'--preset={get_preset_name(args)}',
214+
f'install-destdir={workspace}/build/compat_macos/install',
215+
f'install-prefix=/toolchain/usr',
216+
f'install-symroot={workspace}/build/compat_macos/symroot',
217+
f'--installable-package={workspace}/build/compat_macos/root.tar.gz',
218+
f'--symbols-package={workspace}/build/compat_macos/root-symbols.tar.gz',
236219
]
237-
if args.cmake_c_launcher:
238-
build_command += ['--cmake-c-launcher={}'.format(args.cmake_c_launcher)]
239-
if args.cmake_cxx_launcher:
240-
build_command += ['--cmake-cxx-launcher={}'.format(args.cmake_cxx_launcher)]
241220
common.check_execute(build_command, timeout=9999999)
242221

243222

0 commit comments

Comments
 (0)