@@ -114,7 +114,9 @@ final class BuildPlanTests: XCTestCase {
114
114
" -emit-executable " ,
115
115
" @/path/to/build/debug/exe.product/Objects.LinkFileList " ,
116
116
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift/macosx " ,
117
- " -target " , " x86_64-apple-macosx10.10 " ,
117
+ " -target " , " x86_64-apple-macosx10.10 " , " -Xlinker " , " -add_ast_path " ,
118
+ " -Xlinker " , " /path/to/build/debug/exe.swiftmodule " , " -Xlinker " , " -add_ast_path " ,
119
+ " -Xlinker " , " /path/to/build/debug/lib.swiftmodule " ,
118
120
]
119
121
#else
120
122
let linkArguments = [
@@ -457,6 +459,7 @@ final class BuildPlanTests: XCTestCase {
457
459
" @/path/to/build/debug/exe.product/Objects.LinkFileList " ,
458
460
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift/macosx " ,
459
461
" -target " , " x86_64-apple-macosx10.10 " ,
462
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/exe.swiftmodule " ,
460
463
] )
461
464
#else
462
465
XCTAssertEqual ( try result. buildProduct ( for: " exe " ) . linkArguments ( ) , [
@@ -600,6 +603,8 @@ final class BuildPlanTests: XCTestCase {
600
603
" @/path/to/build/debug/PkgPackageTests.product/Objects.LinkFileList " ,
601
604
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift/macosx " ,
602
605
" -target " , " x86_64-apple-macosx10.10 " ,
606
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/FooTests.swiftmodule " ,
607
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/Foo.swiftmodule " ,
603
608
] )
604
609
#else
605
610
XCTAssertEqual ( try result. buildProduct ( for: " PkgPackageTests " ) . linkArguments ( ) , [
@@ -652,6 +657,7 @@ final class BuildPlanTests: XCTestCase {
652
657
" @/path/to/build/debug/exe.product/Objects.LinkFileList " ,
653
658
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift/macosx " ,
654
659
" -target " , " x86_64-apple-macosx10.10 " ,
660
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/exe.swiftmodule " ,
655
661
] )
656
662
#else
657
663
XCTAssertEqual ( try result. buildProduct ( for: " exe " ) . linkArguments ( ) , [
@@ -745,6 +751,7 @@ final class BuildPlanTests: XCTestCase {
745
751
" @/path/to/build/debug/Foo.product/Objects.LinkFileList " ,
746
752
" -Xlinker " , " -rpath " , " -Xlinker " , " /fake/path/lib/swift/macosx " ,
747
753
" -target " , " x86_64-apple-macosx10.10 " ,
754
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/Foo.swiftmodule "
748
755
] )
749
756
750
757
XCTAssertEqual ( barLinkArgs, [
@@ -753,6 +760,7 @@ final class BuildPlanTests: XCTestCase {
753
760
" -module-name " , " Bar_Baz " , " -emit-library " ,
754
761
" @/path/to/build/debug/Bar-Baz.product/Objects.LinkFileList " ,
755
762
" -target " , " x86_64-apple-macosx10.10 " ,
763
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/Bar.swiftmodule "
756
764
] )
757
765
#else
758
766
XCTAssertEqual ( fooLinkArgs, [
@@ -820,6 +828,7 @@ final class BuildPlanTests: XCTestCase {
820
828
" -emit-library " ,
821
829
" @/path/to/build/debug/lib.product/Objects.LinkFileList " ,
822
830
" -target " , " x86_64-apple-macosx10.10 " ,
831
+ " -Xlinker " , " -add_ast_path " , " -Xlinker " , " /path/to/build/debug/lib.swiftmodule " ,
823
832
]
824
833
#else
825
834
let linkArguments = [
@@ -1384,7 +1393,7 @@ final class BuildPlanTests: XCTestCase {
1384
1393
XCTAssertMatch ( exe, [ . anySequence, " -DFOO " , " -framework " , " CoreData " , . end] )
1385
1394
1386
1395
let linkExe = try result. buildProduct ( for: " exe " ) . linkArguments ( )
1387
- XCTAssertMatch ( linkExe, [ . anySequence, " -lsqlite3 " , " -llibz " , " -framework " , " CoreData " , " -Ilfoo " , " -L " , " lbar " , . end ] )
1396
+ XCTAssertMatch ( linkExe, [ . anySequence, " -lsqlite3 " , " -llibz " , " -framework " , " CoreData " , " -Ilfoo " , " -L " , " lbar " , . anySequence ] )
1388
1397
}
1389
1398
}
1390
1399
0 commit comments