New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLVM stdenvs with LLD outside of pkgsLLVM #142901
Comments
It doesn't work with ld.bfd at all? Wow. I suppose we could just make |
It does work to an extent, i. e. you can build |
I kinda dislike #122778 and want to make |
Arguably you could also say this about the compiler or the toolchain in general, but it makes sense in the context of a package set generally.
I'm also a bit torn on this one, maybe |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Hi, let me resurrect this issue 😃 IMO the Same for |
This is currently one of the major obstacles to |
I think it would be surprising on Darwin if something that just needed a newer (or specific) version of clang also got lld in place of ld64. It would be nice if Darwin could use just lld, but it’s unfortunately not there yet. |
Ever since #122778
llvmPackages_*.stdenv
andllvmPackages_*.libcxxStdenv
respectsstdenv.hostPlatform.linker
. This means that it'll be usingld.bfd
on Linux andcctools
on macOS.This has a big downside, namely it being virtually impossible to produce C++ binaries using these
stdenv
s. This seems to be caused by the fact thatld.bfd
doesn't really understand the object filesclang
produces (cctools
probably works fine? Haven't tested it on darwin so far). This is quite a shame especially withlibcxxStdenv
.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 LLVMstdenv
with a different name (which one?) or b) revert the meaning ofllvmPackages_*.stdenv
to the pre 21.05 days and have it use LLD unconditionally.cc @Ericson2314
The text was updated successfully, but these errors were encountered: