File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2080,7 +2080,8 @@ public class BuildPlan {
2080
2080
// Note: This will come from build settings in future.
2081
2081
for target in dependencies. staticTargets {
2082
2082
if case let target as ClangTarget = target. underlyingTarget, target. isCXX {
2083
- buildProduct. additionalFlags += self . buildParameters. toolchain. extraCPPFlags
2083
+ // Since we are using `swiftc` as the linker driver, we need to prefix these.
2084
+ buildProduct. additionalFlags += self . buildParameters. toolchain. extraCPPFlags. flatMap ( { [ " -Xcc " , $0] } )
2084
2085
break
2085
2086
}
2086
2087
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,7 @@ final class BuildPlanTests: XCTestCase {
1906
1906
#if os(macOS)
1907
1907
XCTAssertEqual ( try result. buildProduct ( for: " lib " ) . linkArguments ( ) , [
1908
1908
result. plan. buildParameters. toolchain. swiftCompilerPath. pathString,
1909
- " -lc++ " ,
1909
+ " -Xcc " , " - lc++" ,
1910
1910
" -L " , buildPath. pathString,
1911
1911
" -o " , buildPath. appending ( components: " liblib.dylib " ) . pathString,
1912
1912
" -module-name " , " lib " ,
You can’t perform that action at this time.
0 commit comments