@@ -645,8 +645,8 @@ final class BuildPlanTests: XCTestCase {
645
645
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
646
646
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
647
647
" -target " , defaultTargetTriple,
648
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
648
649
" -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " exe.build " , " exe.swiftmodule " ) . pathString,
649
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " lib.swiftmodule " ) . pathString,
650
650
" -g " ,
651
651
]
652
652
#elseif os(Windows)
@@ -869,7 +869,7 @@ final class BuildPlanTests: XCTestCase {
869
869
let contents : String = try fs. readFileContents ( yaml)
870
870
let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
871
871
XCTAssertMatch ( contents, . contains( """
872
- inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString) " , " \( swiftGetVersionFilePath. escapedPathString) " , " \( buildPath. appending ( components: " PkgLib.swiftmodule " ) . escapedPathString) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString) " ]
872
+ inputs: [ " \( Pkg . appending ( components: " Sources " , " exe " , " main.swift " ) . escapedPathString) " , " \( swiftGetVersionFilePath. escapedPathString) " , " \( buildPath. appending ( components: " Modules " , " PkgLib.swiftmodule " ) . escapedPathString) " , " \( buildPath. appending ( components: " exe.build " , " sources " ) . escapedPathString) " ]
873
873
""" ) )
874
874
875
875
}
@@ -1736,8 +1736,8 @@ final class BuildPlanTests: XCTestCase {
1736
1736
" @ \( buildPath. appending ( components: " PkgPackageTests.product " , " Objects.LinkFileList " ) ) " ] +
1737
1737
rpathsForBackdeployment +
1738
1738
[ " -target " , " \( hostTriple. tripleString ( forPlatformVersion: version) ) " ,
1739
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Foo.swiftmodule " ) . pathString,
1740
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " FooTests.swiftmodule " ) . pathString,
1739
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " Foo.swiftmodule " ) . pathString,
1740
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " FooTests.swiftmodule " ) . pathString,
1741
1741
" -g " ,
1742
1742
] )
1743
1743
#elseif os(Windows)
@@ -2313,7 +2313,7 @@ final class BuildPlanTests: XCTestCase {
2313
2313
" @ \( buildPath. appending ( components: " Bar-Baz.product " , " Objects.LinkFileList " ) ) " ,
2314
2314
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
2315
2315
" -target " , defaultTargetTriple,
2316
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Bar.swiftmodule " ) . pathString,
2316
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " Bar.swiftmodule " ) . pathString,
2317
2317
" -g " ,
2318
2318
] )
2319
2319
#elseif os(Windows)
@@ -2432,7 +2432,7 @@ final class BuildPlanTests: XCTestCase {
2432
2432
" @ \( buildPath. appending ( components: " lib.product " , " Objects.LinkFileList " ) ) " ,
2433
2433
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
2434
2434
" -target " , defaultTargetTriple,
2435
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " lib.swiftmodule " ) . pathString,
2435
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
2436
2436
" -g " ,
2437
2437
]
2438
2438
#elseif os(Windows)
@@ -4110,7 +4110,7 @@ final class BuildPlanTests: XCTestCase {
4110
4110
XCTAssertMatch ( contents, . contains( """
4111
4111
" \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " :
4112
4112
tool: clang
4113
- inputs: [ " \( buildPath. appending ( components: " Foo.swiftmodule " ) . escapedPathString) " , " \( PkgA . appending ( components: " Sources " , " Bar " , " main.m " ) . escapedPathString) " ]
4113
+ inputs: [ " \( buildPath. appending ( components: " Modules " , " Foo.swiftmodule " ) . escapedPathString) " , " \( PkgA . appending ( components: " Sources " , " Bar " , " main.m " ) . escapedPathString) " ]
4114
4114
outputs: [ " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " ]
4115
4115
description: " Compiling Bar main.m "
4116
4116
""" ) )
@@ -4184,7 +4184,7 @@ final class BuildPlanTests: XCTestCase {
4184
4184
XCTAssertMatch ( contents, . contains( """
4185
4185
" \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " :
4186
4186
tool: clang
4187
- inputs: [ " \( buildPath. appending ( components: " Foo.swiftmodule " ) . escapedPathString) " , " \( PkgA . appending ( components: " Sources " , " Bar " , " main.m " ) . escapedPathString) " ]
4187
+ inputs: [ " \( buildPath. appending ( components: " Modules " , " Foo.swiftmodule " ) . escapedPathString) " , " \( PkgA . appending ( components: " Sources " , " Bar " , " main.m " ) . escapedPathString) " ]
4188
4188
outputs: [ " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " ]
4189
4189
description: " Compiling Bar main.m "
4190
4190
""" ) )
@@ -4322,10 +4322,10 @@ final class BuildPlanTests: XCTestCase {
4322
4322
XCTAssertMatch ( contents, . contains( """
4323
4323
" \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " :
4324
4324
tool: shell
4325
- inputs: [ " \( buildPath. appending ( components: " lib.swiftmodule " ) . escapedPathString) " ]
4325
+ inputs: [ " \( buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . escapedPathString) " ]
4326
4326
outputs: [ " \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " ]
4327
4327
description: " Wrapping AST for lib for debugging "
4328
- args: [ " \( result. plan. buildParameters. toolchain. swiftCompilerPath. escapedPathString) " , " -modulewrap " , " \( buildPath. appending ( components: " lib.swiftmodule " ) . escapedPathString) " , " -o " , " \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " , " -target " , " x86_64-unknown-linux-gnu " ]
4328
+ args: [ " \( result. plan. buildParameters. toolchain. swiftCompilerPath. escapedPathString) " , " -modulewrap " , " \( buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . escapedPathString) " , " -o " , " \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " , " -target " , " x86_64-unknown-linux-gnu " ]
4329
4329
""" ) )
4330
4330
}
4331
4331
@@ -4958,7 +4958,7 @@ final class BuildPlanTests: XCTestCase {
4958
4958
4959
4959
let yamlContents : String = try fs. readFileContents ( yaml)
4960
4960
let inputs : SerializedJSON = """
4961
- inputs: [ " \( AbsolutePath ( " /Pkg/Snippets/ASnippet.swift " ) ) " , " \( swiftGetVersionFilePath) " , " \( AbsolutePath ( " /Pkg/.build/debug/Lib.swiftmodule " ) ) "
4961
+ inputs: [ " \( AbsolutePath ( " /Pkg/Snippets/ASnippet.swift " ) ) " , " \( swiftGetVersionFilePath) " , " \( AbsolutePath ( " /Pkg/.build/debug/Modules/ Lib.swiftmodule " ) ) "
4962
4962
"""
4963
4963
XCTAssertMatch ( yamlContents, . contains( inputs. underlying) )
4964
4964
}
@@ -5173,8 +5173,8 @@ final class BuildPlanTests: XCTestCase {
5173
5173
" @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
5174
5174
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
5175
5175
" -target " , defaultTargetTriple,
5176
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
5176
5177
" -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " exe.build " , " exe.swiftmodule " ) . pathString,
5177
- " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " lib.swiftmodule " ) . pathString,
5178
5178
" -g " ,
5179
5179
]
5180
5180
#elseif os(Windows)
0 commit comments