-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
LLVM stdenvs with LLD outside of pkgsLLVM #142901
Copy link
Copy link
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: exoticExotic hardware or software platformExotic hardware or software platform6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and relatedIssues related to llvmPackages, clangStdenv and related6.topic: stdenvStandard environmentStandard environment
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: exoticExotic hardware or software platformExotic hardware or software platform6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and relatedIssues related to llvmPackages, clangStdenv and related6.topic: stdenvStandard environmentStandard environment
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
Ever since #122778
llvmPackages_*.stdenvandllvmPackages_*.libcxxStdenvrespectsstdenv.hostPlatform.linker. This means that it'll be usingld.bfdon Linux andcctoolson 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 thatld.bfddoesn't really understand the object filesclangproduces (cctoolsprobably 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_*.stdenvusing the default linker for the platforms and create a new clang+lld LLVMstdenvwith a different name (which one?) or b) revert the meaning ofllvmPackages_*.stdenvto the pre 21.05 days and have it use LLD unconditionally.cc @Ericson2314