-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Ever since #122778 llvmPackages_*.stdenv and llvmPackages_*.libcxxStdenv respects stdenv.hostPlatform.linker. This means that it'll be using ld.bfd on Linux and cctools on macOS.
This has a big downside, namely it being virtually impossible to produce C++ binaries using these stdenvs. This seems to be caused by the fact that ld.bfd doesn't really understand the object files clang produces (cctools probably works fine? Haven't tested it on darwin so far). This is quite a shame especially with libcxxStdenv.
Current workarounds for this are either using pkgsLLVM.stdenv (which cross-compiles, however) or using the following incantation: overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override { inherit (llvmPackages) bintools; }).
I've been struggling to find a clear way forward and not opened a PR for this so far, but would really like to fix this in a satisfying way. The question is mostly if we a) want to preserve llvmPackages_*.stdenv using the default linker for the platforms and create a new clang+lld LLVM stdenv with a different name (which one?) or b) revert the meaning of llvmPackages_*.stdenv to the pre 21.05 days and have it use LLD unconditionally.
cc @Ericson2314
Metadata
Metadata
Assignees
Labels
Projects
Status