@@ -195,49 +195,28 @@ def execute_runner(workspace: str, args: argparse.Namespace) -> bool:
195
195
return passed
196
196
197
197
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
+
198
210
def build_swift_toolchain (workspace : str , args : argparse .Namespace ) -> None :
199
211
build_command = [
200
212
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' ,
236
219
]
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 )]
241
220
common .check_execute (build_command , timeout = 9999999 )
242
221
243
222
0 commit comments