Skip to content

Commit d770b90

Browse files
authored
Tests: remove -lstdc++ on Windows test expectations (#5816)
Windows uses a different C++ runtime, which we rely on the linker driver to adjust the linker invocation (due to ABI incompatibilities between debug and release builds). This allows the BuildPlan tests to now pass on Windows.
1 parent 6ab0f24 commit d770b90

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,6 @@ final class BuildPlanTests: XCTestCase {
844844
#elseif os(Windows)
845845
XCTAssertEqual(try result.buildProduct(for: "exe").linkArguments(), [
846846
result.plan.buildParameters.toolchain.swiftCompilerPath.pathString,
847-
"-lstdc++",
848847
"-L", buildPath.pathString,
849848
"-o", buildPath.appending(components: "exe.exe").pathString,
850849
"-module-name", "exe",
@@ -1606,7 +1605,7 @@ final class BuildPlanTests: XCTestCase {
16061605

16071606
#if os(macOS)
16081607
XCTAssertMatch(linkArgs, ["-lc++"])
1609-
#else
1608+
#elseif !os(Windows)
16101609
XCTAssertMatch(linkArgs, ["-lstdc++"])
16111610
#endif
16121611
}
@@ -1932,7 +1931,6 @@ final class BuildPlanTests: XCTestCase {
19321931
#elseif os(Windows)
19331932
XCTAssertEqual(try result.buildProduct(for: "lib").linkArguments(), [
19341933
result.plan.buildParameters.toolchain.swiftCompilerPath.pathString,
1935-
"-lstdc++",
19361934
"-L", buildPath.pathString,
19371935
"-o", buildPath.appending(components: "lib.dll").pathString,
19381936
"-module-name", "lib",

0 commit comments

Comments
 (0)