@@ -238,6 +238,7 @@ if 'gmalloc' in lit_config.params:
238
238
config .environment ['MALLOC_LOG_FILE' ] = '/dev/null'
239
239
config .available_features .add ('gmalloc' )
240
240
241
+ config .swift_frontend = inferSwiftBinary ('swift-frontend' )
241
242
config .swift = inferSwiftBinary ('swift' )
242
243
config .swiftc = inferSwiftBinary ('swiftc' )
243
244
config .sil_opt = inferSwiftBinary ('sil-opt' )
@@ -432,8 +433,8 @@ config.substitutions.append( ('%swift-path', config.swift) )
432
433
# This must come after all substitutions containing "%swift".
433
434
config .substitutions .append (
434
435
('%swift' ,
435
- "%r -frontend %s -disable-objc-attr-requires-foundation-module %s %s"
436
- % (config .swift , mcp_opt , config .swift_test_options , config .swift_frontend_test_options )) )
436
+ "%r %s -disable-objc-attr-requires-foundation-module %s %s"
437
+ % (config .swift_frontend , mcp_opt , config .swift_test_options , config .swift_frontend_test_options )) )
437
438
438
439
config .clang_include_dir = make_path (config .swift , '..' , '..' , 'include' )
439
440
config .substitutions .append ( ('%clang-include-dir' , config .clang_include_dir ) )
@@ -970,12 +971,12 @@ if run_vendor == 'apple':
970
971
if run_os == 'maccatalyst' :
971
972
maccatalyst_extra_frameworks = "-F {}/System/iOSSupport/System/Library/Frameworks" .format (config .variant_sdk )
972
973
config .target_swift_frontend = (
973
- "%s -frontend %s -sdk %r %s %s %s" %
974
- (config .swiftc , target_options , config .variant_sdk , maccatalyst_extra_frameworks ,
974
+ "%s %s -sdk %r %s %s %s" %
975
+ (config .swift_frontend , target_options , config .variant_sdk , maccatalyst_extra_frameworks ,
975
976
config .swift_test_options , config .swift_frontend_test_options ))
976
977
subst_target_swift_frontend_mock_sdk = (
977
- "%s -frontend %s -sdk %r %s %s" %
978
- (config .swiftc , target_options_for_mock_sdk , config .variant_sdk ,
978
+ "%s %s -sdk %r %s %s" %
979
+ (config .swift_frontend , target_options_for_mock_sdk , config .variant_sdk ,
979
980
config .swift_test_options , config .swift_frontend_test_options ))
980
981
config .target_swift_modulewrap = (
981
982
'%s -modulewrap -target %s' %
@@ -1049,7 +1050,7 @@ elif run_os in ['windows-msvc']:
1049
1050
config .target_run = ''
1050
1051
1051
1052
config .target_swift_frontend = \
1052
- ('%r -frontend - target %s %s %s %s %s' % (config .swiftc , \
1053
+ ('%r -target %s %s %s %s %s' % (config .swift_frontend , \
1053
1054
config .variant_triple , \
1054
1055
resource_dir_opt , mcp_opt , \
1055
1056
config .swift_test_options , \
@@ -1174,8 +1175,8 @@ elif (run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'openbsd', 'windows-
1174
1175
% (config .target_build_swift ))
1175
1176
config .target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
1176
1177
config .target_swift_frontend = (
1177
- '%s -frontend - target %s %s %s %s %s '
1178
- % (config .swift , config .variant_triple , resource_dir_opt , mcp_opt ,
1178
+ '%s -target %s %s %s %s %s '
1179
+ % (config .swift_frontend , config .variant_triple , resource_dir_opt , mcp_opt ,
1179
1180
config .swift_test_options , config .swift_frontend_test_options ))
1180
1181
subst_target_swift_frontend_mock_sdk = config .target_swift_frontend
1181
1182
subst_target_swift_frontend_mock_sdk_after = ""
@@ -1293,8 +1294,7 @@ elif run_os == 'linux-androideabi' or run_os == 'linux-android':
1293
1294
'-o' , "'\\ 1'" ])
1294
1295
config .target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
1295
1296
config .target_swift_frontend = ' ' .join ([
1296
- config .swift ,
1297
- '-frontend' ,
1297
+ config .swift_frontend ,
1298
1298
'-target' , config .variant_triple ,
1299
1299
android_include_paths_opt , android_link_paths_opt ,
1300
1300
resource_dir_opt , mcp_opt , config .swift_test_options ,
@@ -1370,8 +1370,7 @@ elif run_os == 'wasi':
1370
1370
% (config .target_build_swift ))
1371
1371
config .target_add_rpath = ''
1372
1372
config .target_swift_frontend = ' ' .join ([
1373
- config .swift ,
1374
- '-frontend' ,
1373
+ config .swift_frontend ,
1375
1374
'-target' , config .variant_triple ,
1376
1375
'-Xcc' , '--sysroot=%s' % config .variant_sdk ,
1377
1376
resource_dir_opt , mcp_opt ,
0 commit comments