Sets the linker language to 'C' so that the driver used to link is the 'C' driver (clang) instead of the 'C++' driver (clang++). Since libc++ does not depend on an existing C++ runtime we need to avoid the implicit circular dependency to a C++ library by the driver. This means we should either use the 'C' driver (clang) instead of the 'C++' driver (clang++) or we should use the '-nostdlib++' clang (which is non-portable). Using the C driver for linking has the benefit of not longer requiring the non-portable '-nostdlib++' flag to avoid injecting the link against an existing C++ runtime.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This version also breaks libc++ tests on NetBSD. Furthermore, a better explanation than 'needs to be set' would be good.
libunwind/src/CMakeLists.txt | ||
---|---|---|
130 ↗ | (On Diff #227990) | This was already done in 6db7a5cd7c800a588e94ce5c1ef24ae4d60ecdd3. |
Comment Actions
Actually, compnerd has reverted his change, so I suppose this is back up for discussion.
Comment Actions
We are working on a new change to address the netbsd issues. There appears to be a case where cmake is injecting incorrect linkage when building for NetBSD, which caused the bot failures when the linker language was changed.