Skip to content

Commit be49f44

Browse files
committed
repair build after swiftlang#32903
Repair the Windows build after swiftlang#32903
1 parent d9a88b9 commit be49f44

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

test/ScanDependencies/can_import_with_map.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// RUN: echo "}," >> %/t/inputs/map.json
1313
// RUN: echo "{" >> %/t/inputs/map.json
1414
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
15-
// RUN: echo "\"modulePath\": \"%stdlib_module\"," >> %/t/inputs/map.json
15+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
1616
// RUN: echo "}," >> %/t/inputs/map.json
1717
// RUN: echo "{" >> %/t/inputs/map.json
1818
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
19-
// RUN: echo "\"modulePath\": \"%ononesupport_module\"," >> %/t/inputs/map.json
19+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
2020
// RUN: echo "}]" >> %/t/inputs/map.json
2121

2222
// RUN: %target-swift-frontend -typecheck %s -explicit-swift-module-map-file %t/inputs/map.json -disable-implicit-swift-modules

test/ScanDependencies/explicit-module-map-forwarding-module.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
// RUN: echo "}," >> %/t/inputs/map.json
2323
// RUN: echo "{" >> %/t/inputs/map.json
2424
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
25-
// RUN: echo "\"modulePath\": \"%stdlib_module\"," >> %/t/inputs/map.json
25+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
2626
// RUN: echo "}," >> %/t/inputs/map.json
2727
// RUN: echo "{" >> %/t/inputs/map.json
2828
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
29-
// RUN: echo "\"modulePath\": \"%ononesupport_module\"," >> %/t/inputs/map.json
29+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
3030
// RUN: echo "}]" >> %/t/inputs/map.json
3131

3232
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

test/ScanDependencies/explicit-module-map.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
// RUN: echo "}," >> %/t/inputs/map.json
1414
// RUN: echo "{" >> %/t/inputs/map.json
1515
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
16-
// RUN: echo "\"modulePath\": \"%stdlib_module\"," >> %/t/inputs/map.json
16+
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
1717
// RUN: echo "}," >> %/t/inputs/map.json
1818
// RUN: echo "{" >> %/t/inputs/map.json
1919
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
20-
// RUN: echo "\"modulePath\": \"%ononesupport_module\"," >> %/t/inputs/map.json
20+
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
2121
// RUN: echo "}]" >> %/t/inputs/map.json
2222

2323
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

test/lit.cfg

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,23 +1441,27 @@ config.substitutions.append(('%target-sdk-name', config.target_sdk_name))
14411441

14421442
# Add 'stdlib_dir' as the path to the stdlib resource directory
14431443
stdlib_dir = config.swift_lib_dir + "/swift/"
1444-
if platform.system() == 'Linux':
1445-
stdlib_dir += config.target_sdk_name + "/" + run_cpu
1446-
else:
1444+
if platform.system() == 'Darwin':
14471445
stdlib_dir += config.target_sdk_name
1446+
else:
1447+
stdlib_dir += config.target_sdk_name + "/" + run_cpu
14481448
config.substitutions.append(('%stdlib_dir', stdlib_dir))
14491449

14501450
# Add 'stdlib_module' as the path to the stdlib .swiftmodule file
1451-
stdlib_module = stdlib_dir + "/Swift.swiftmodule"
1451+
stdlib_module = os.path.join(stdlib_dir, "Swift.swiftmodule")
14521452
if platform.system() == 'Darwin':
14531453
stdlib_module += "/" + target_specific_module_triple + ".swiftmodule"
14541454
config.substitutions.append(('%stdlib_module', stdlib_module))
1455+
config.substitutions.append(('%/stdlib_module',
1456+
'/'.join(os.path.normpath(stdlib_module).split(os.sep))))
14551457

14561458
# Add 'ononesupport_module' as the path to the SwiftOnoneSupport .swiftmodule file
1457-
ononesupport_module = stdlib_dir + "/SwiftOnoneSupport.swiftmodule"
1459+
ononesupport_module = os.path.join(stdlib_dir, "SwiftOnoneSupport.swiftmodule")
14581460
if platform.system() == 'Darwin':
14591461
ononesupport_module += "/" + target_specific_module_triple + ".swiftmodule"
1460-
config.substitutions.append(('%ononesupport_module', ononesupport_module))
1462+
config.substitutions.append(('%ononesupport_module', ononesupport_module))
1463+
config.substitutions.append(('%/ononesupport_module',
1464+
'/'.join(os.path.normpath(ononesupport_module).split(os.sep))))
14611465

14621466
# Different OS's require different prefixes for the environment variables to be
14631467
# propagated to the calling contexts.

0 commit comments

Comments
 (0)