@@ -645,8 +645,8 @@ final class BuildPlanTests: XCTestCase {
645645 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
646646 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
647647 " -target " , defaultTargetTriple,
648+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
648649 " -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,
650650 " -g " ,
651651 ]
652652 #elseif os(Windows)
@@ -869,7 +869,7 @@ final class BuildPlanTests: XCTestCase {
869869 let contents : String = try fs. readFileContents ( yaml)
870870 let swiftGetVersionFilePath = try XCTUnwrap ( llbuild. swiftGetVersionFiles. first? . value)
871871 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) " ]
873873 """ ) )
874874
875875 }
@@ -1736,8 +1736,8 @@ final class BuildPlanTests: XCTestCase {
17361736 " @ \( buildPath. appending ( components: " PkgPackageTests.product " , " Objects.LinkFileList " ) ) " ] +
17371737 rpathsForBackdeployment +
17381738 [ " -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,
17411741 " -g " ,
17421742 ] )
17431743 #elseif os(Windows)
@@ -2313,7 +2313,7 @@ final class BuildPlanTests: XCTestCase {
23132313 " @ \( buildPath. appending ( components: " Bar-Baz.product " , " Objects.LinkFileList " ) ) " ,
23142314 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
23152315 " -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,
23172317 " -g " ,
23182318 ] )
23192319 #elseif os(Windows)
@@ -2432,7 +2432,7 @@ final class BuildPlanTests: XCTestCase {
24322432 " @ \( buildPath. appending ( components: " lib.product " , " Objects.LinkFileList " ) ) " ,
24332433 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
24342434 " -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,
24362436 " -g " ,
24372437 ]
24382438 #elseif os(Windows)
@@ -4110,7 +4110,7 @@ final class BuildPlanTests: XCTestCase {
41104110 XCTAssertMatch ( contents, . contains( """
41114111 " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " :
41124112 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) " ]
41144114 outputs: [ " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " ]
41154115 description: " Compiling Bar main.m "
41164116 """ ) )
@@ -4184,7 +4184,7 @@ final class BuildPlanTests: XCTestCase {
41844184 XCTAssertMatch ( contents, . contains( """
41854185 " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " :
41864186 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) " ]
41884188 outputs: [ " \( buildPath. appending ( components: " Bar.build " , " main.m.o " ) . escapedPathString) " ]
41894189 description: " Compiling Bar main.m "
41904190 """ ) )
@@ -4322,10 +4322,10 @@ final class BuildPlanTests: XCTestCase {
43224322 XCTAssertMatch ( contents, . contains( """
43234323 " \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " :
43244324 tool: shell
4325- inputs: [ " \( buildPath. appending ( components: " lib.swiftmodule " ) . escapedPathString) " ]
4325+ inputs: [ " \( buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . escapedPathString) " ]
43264326 outputs: [ " \( buildPath. appending ( components: " lib.build " , " lib.swiftmodule.o " ) . escapedPathString) " ]
43274327 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 " ]
43294329 """ ) )
43304330 }
43314331
@@ -4958,7 +4958,7 @@ final class BuildPlanTests: XCTestCase {
49584958
49594959 let yamlContents : String = try fs. readFileContents ( yaml)
49604960 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 " ) ) "
49624962 """
49634963 XCTAssertMatch ( yamlContents, . contains( inputs. underlying) )
49644964 }
@@ -5173,8 +5173,8 @@ final class BuildPlanTests: XCTestCase {
51735173 " @ \( buildPath. appending ( components: " exe.product " , " Objects.LinkFileList " ) ) " ,
51745174 " -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift-5.5/macosx " ,
51755175 " -target " , defaultTargetTriple,
5176+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , buildPath. appending ( components: " Modules " , " lib.swiftmodule " ) . pathString,
51765177 " -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,
51785178 " -g " ,
51795179 ]
51805180 #elseif os(Windows)
0 commit comments