diff --git a/Sources/SwiftBuildSupport/PackagePIFBuilder.swift b/Sources/SwiftBuildSupport/PackagePIFBuilder.swift index 88a2bee948f..ba854b1f461 100644 --- a/Sources/SwiftBuildSupport/PackagePIFBuilder.swift +++ b/Sources/SwiftBuildSupport/PackagePIFBuilder.swift @@ -651,9 +651,9 @@ extension PackagePIFBuilder.LinkedPackageBinary { init?(dependency: ResolvedModule.Dependency, package: ResolvedPackage) { switch dependency { - case .product(let producutDependency, _): - guard producutDependency.hasSourceTargets else { return nil } - self.init(name: producutDependency.name, packageName: package.name, type: .product) + case .product(let productDependency, _): + guard productDependency.hasSourceTargets else { return nil } + self.init(name: productDependency.name, packageName: package.name, type: .product) case .module(let moduleDependency, _): self.init(module: moduleDependency, package: package) diff --git a/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift b/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift index ca71fa6f7f3..028c9e537ea 100644 --- a/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift +++ b/Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift @@ -504,20 +504,14 @@ extension PackagePIFProjectBuilder { } // Additional settings for the linker. - let baselineOTHER_LDFLAGS: [String] let enableDuplicateLinkageCulling = UserDefaults.standard.bool( forKey: "IDESwiftPackagesEnableDuplicateLinkageCulling", defaultValue: true ) if enableDuplicateLinkageCulling { - baselineOTHER_LDFLAGS = [ - "-Wl,-no_warn_duplicate_libraries", - "$(inherited)" - ] - } else { - baselineOTHER_LDFLAGS = ["$(inherited)"] + impartedSettings[.LD_WARN_DUPLICATE_LIBRARIES] = "NO" } - impartedSettings[.OTHER_LDFLAGS] = (sourceModule.isCxx ? ["-lc++"] : []) + baselineOTHER_LDFLAGS + impartedSettings[.OTHER_LDFLAGS] = (sourceModule.isCxx ? ["-lc++"] : []) + ["$(inherited)"] impartedSettings[.OTHER_LDRFLAGS] = [] log( .debug, diff --git a/Tests/CommandsTests/BuildCommandTests.swift b/Tests/CommandsTests/BuildCommandTests.swift index ca39fc6bbce..2c700c1e7e7 100644 --- a/Tests/CommandsTests/BuildCommandTests.swift +++ b/Tests/CommandsTests/BuildCommandTests.swift @@ -956,13 +956,4 @@ class BuildCommandSwiftBuildTests: BuildCommandTestCases { try await super.testBuildSystemDefaultSettings() } - - override func testBuildCompleteMessage() async throws { - #if os(Linux) - throw XCTSkip("SWBINTTODO: Need to properly set LD_LIBRARY_PATH on linux") - #else - try await super.testBuildCompleteMessage() - #endif - } - } diff --git a/Tests/CommandsTests/PackageCommandTests.swift b/Tests/CommandsTests/PackageCommandTests.swift index eb1f658d432..b340ea131f1 100644 --- a/Tests/CommandsTests/PackageCommandTests.swift +++ b/Tests/CommandsTests/PackageCommandTests.swift @@ -3859,15 +3859,9 @@ class PackageCommandSwiftBuildTests: PackageCommandTestCase { } override func testCommandPluginBuildingCallbacks() async throws { - throw XCTSkip("SWBINTTODO: Test fails as plugins are not currenty supported") + throw XCTSkip("SWBINTTODO: Test fails because plugin is not producing expected output to stdout.") } override func testCommandPluginBuildTestability() async throws { throw XCTSkip("SWBINTTODO: Test fails as plugins are not currenty supported") } - -#if !os(macOS) - override func testCommandPluginTestingCallbacks() async throws { - throw XCTSkip("SWBINTTODO: Test fails on inability to find libclang on Linux. Also, plugins are not currently supported") - } -#endif } diff --git a/Tests/CommandsTests/TestCommandTests.swift b/Tests/CommandsTests/TestCommandTests.swift index 436839d9fef..f4fece83f0c 100644 --- a/Tests/CommandsTests/TestCommandTests.swift +++ b/Tests/CommandsTests/TestCommandTests.swift @@ -701,35 +701,35 @@ class TestCommandSwiftBuildTests: TestCommandTestCase { #if !os(macOS) override func testSwiftTestXMLOutputVerifySingleTestFailureMessageWithFlagDisabledXCTest() async throws { - throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestXMLOutputVerifyMultipleTestFailureMessageWithFlagEnabledXCTest() async throws { - throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestXMLOutputVerifySingleTestFailureMessageWithFlagEnabledXCTest() async throws { - throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestXMLOutputVerifyMultipleTestFailureMessageWithFlagDisabledXCTest() async throws { - throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestSkip() async throws { - throw XCTSkip("This fails due to a linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestXMLOutputWhenEmpty() async throws { - throw XCTSkip("This fails due to a linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestFilter() async throws { - throw XCTSkip("This fails due to an unknown linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } override func testSwiftTestParallel() async throws { - throw XCTSkip("This fails due to an unknown linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439") + throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479") } #endif }