@@ -378,15 +378,22 @@ else:
378
378
test_resource_dir = make_path (config .swift_lib_dir , 'swift' )
379
379
config .swift_system_overlay_opt = ""
380
380
config .clang_system_overlay_opt = ""
381
+ config .windows_vfs_overlay_opt = ""
381
382
if kIsWindows :
382
383
# ucrt.modulemap currently requires -fbuiltin-headers-in-system-modules. -strict-implicit-module-context
383
384
# is necessary for -Xcc arguments to be passed through ModuleInterfaceLoader.
384
385
config .swift_system_overlay_opt = "-vfsoverlay {} -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules" .format (
385
386
os .path .join (config .swift_obj_root , "stdlib" , "windows-vfs-overlay.yaml" )
386
387
)
388
+ # this variant is for extract-symbolgraph which doesn't accept all the same arugments as swiftc
389
+ # so the extra ceremony lets us pass in the relevant pieces needed for Windows SDK access.
390
+ config .windows_vfs_overlay_opt = "-Xcc -vfsoverlay -Xcc {} -Xcc -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules" .format (
391
+ os .path .join (config .swift_obj_root , "stdlib" , "windows-vfs-overlay.yaml" )
392
+ )
387
393
config .clang_system_overlay_opt = "-Xcc -ivfsoverlay -Xcc {} -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules" .format (
388
394
os .path .join (config .swift_obj_root , "stdlib" , "windows-vfs-overlay.yaml" )
389
395
)
396
+ config .substitutions .append ( ('%windows_vfs_overlay_opt' , config .windows_vfs_overlay_opt ) )
390
397
stdlib_resource_dir_opt = config .resource_dir_opt
391
398
sourcekitd_framework_dir = config .swift_lib_dir
392
399
config .substitutions .append ( ('%test-resource-dir' , test_resource_dir ) )
@@ -1341,7 +1348,7 @@ if run_vendor == 'apple':
1341
1348
"-Xlinker -rpath -Xlinker %r " +
1342
1349
"-Xlinker -rpath -Xlinker /usr/lib/swift " +
1343
1350
# This ensures LC_LOAD_DYLIB rewrite will succeed in %target-codesign (rdar://7885126):
1344
- "-Xlinker -headerpad_max_install_names " +
1351
+ "-Xlinker -headerpad_max_install_names " +
1345
1352
"%s %s %s %s" ) %
1346
1353
(xcrun_prefix , config .swiftc , target_options ,
1347
1354
extra_frameworks_dir ,
@@ -1389,7 +1396,7 @@ if run_vendor == 'apple':
1389
1396
("%s %s %s -F %r -toolchain-stdlib-rpath %s " +
1390
1397
"-Xlinker -rpath -Xlinker /usr/lib/swift " +
1391
1398
# This ensures LC_LOAD_DYLIB rewrite will succeed in %target-codesign (rdar://7885126):
1392
- "-Xlinker -headerpad_max_install_names " +
1399
+ "-Xlinker -headerpad_max_install_names " +
1393
1400
" %s %s %s" ) %
1394
1401
(xcrun_prefix , config .swiftc , target_options ,
1395
1402
extra_frameworks_dir ,
@@ -1538,7 +1545,7 @@ if run_vendor == 'apple':
1538
1545
config .target_swiftc_driver = (
1539
1546
("%s %s -toolchain-stdlib-rpath %s " +
1540
1547
# This ensures LC_LOAD_DYLIB rewrite will succeed in %target-codesign (rdar://7885126):
1541
- "-Xlinker -headerpad_max_install_names " +
1548
+ "-Xlinker -headerpad_max_install_names " +
1542
1549
"-Xlinker -rpath -Xlinker /usr/lib/swift %s %s " )%
1543
1550
(xcrun_prefix , config .swiftc , target_options , config .swift_driver_test_options , swiftc_platform_remap_config ))
1544
1551
config .target_stdlib_swiftc_driver = config .target_swiftc_driver
@@ -2226,7 +2233,7 @@ def configure_remote_run():
2226
2233
"--input-prefix '{0}' " .format (config .swift_src_root ) +
2227
2234
"--output-prefix %t " +
2228
2235
"--remote-dir '{0}'%t " .format (remote_tmp_dir ) +
2229
- "{0} " .format (' ' .join (remote_run_extra_args )) +
2236
+ "{0} " .format (' ' .join (remote_run_extra_args )) +
2230
2237
"{0}" .format (remote_run_host ))
2231
2238
config .target_swift_reflection_test = os .path .join (
2232
2239
remote_tmp_dir , 'bin' , swift_reflection_test_name )
0 commit comments