Description
Description
I was just trying to pass -no-toolchain-stdlib-rpath
to the build when installing sourcekit-lsp in swiftlang/sourcekit-lsp#715 and Alex ran a full toolchain build to make sure it worked well. Strangely, it passed on linux and Windows builds sourcekit-lsp using CMake, not SPM, so it only failed on macOS, because it appears to incorrectly pass this Swift linker flag to clang:
0%: Link sourcekit-lsp (x86_64)
clang: error: unknown argument: '-no-toolchain-stdlib-rpath'
I'm not sure why it does this on macOS only, as the SPM source clearly shows the linker command-line running through the Swift compiler.
Expected behavior
No differences in linkerSettings behavior on different platforms
Actual behavior
The given example works on linux, but not macOS.
Steps to reproduce
Add a linkerSettings with a Swift flag like -no-toolchain-stdlib-rpath
and build on macOS.
Swift Package Manager version/commit hash
Swift & OS version (output of swift --version && uname -a
)
Taken from the linked macOS CI run as I don't build on macOS:
Swift compiler commit - 642386290e84e9eeeed8ba70f07d5c3628be728a