@@ -6655,6 +6655,44 @@ class BuildPlanTestCase: BuildSystemProviderTestCase {
6655
6655
}
6656
6656
}
6657
6657
6658
+ func testNoRpathForOSNone( ) async throws {
6659
+ let fileSystem = InMemoryFileSystem (
6660
+ emptyFiles:
6661
+ " /Pkg/Sources/exe/main.swift "
6662
+ )
6663
+ let observability = ObservabilitySystem . makeForTesting ( )
6664
+ let graph = try loadModulesGraph (
6665
+ fileSystem: fileSystem,
6666
+ manifests: [
6667
+ Manifest . createRootManifest (
6668
+ displayName: " Pkg " ,
6669
+ path: " /Pkg " ,
6670
+ targets: [
6671
+ TargetDescription ( name: " exe " ) ,
6672
+ ]
6673
+ ) ,
6674
+ ] ,
6675
+ observabilityScope: observability. topScope
6676
+ )
6677
+ XCTAssertNoDiagnostics ( observability. diagnostics)
6678
+
6679
+ let toolchain = try UserToolchain . default
6680
+ let result = try await BuildPlanResult ( plan: mockBuildPlan (
6681
+ triple: Triple ( " arm64-unknown-none " ) ,
6682
+ toolchain: toolchain,
6683
+ graph: graph,
6684
+ fileSystem: fileSystem,
6685
+ observabilityScope: observability. topScope
6686
+ ) )
6687
+ result. checkProductsCount ( 1 )
6688
+
6689
+ // Assert the objects getting linked contain all the bitcode objects
6690
+ // built by the Swift Target
6691
+ let exeLinkArguments = try result. buildProduct ( for: " exe " ) . linkArguments ( )
6692
+ let exeLinkArgumentsNegativePattern : [ StringPattern ] = [ " -rpath " ]
6693
+ XCTAssertNoMatch ( exeLinkArguments, exeLinkArgumentsNegativePattern)
6694
+ }
6695
+
6658
6696
func testPackageDependencySetsUserModuleVersion( ) async throws {
6659
6697
let fs = InMemoryFileSystem ( emptyFiles: " /Pkg/Sources/exe/main.swift " , " /ExtPkg/Sources/ExtLib/best.swift " )
6660
6698
0 commit comments