firefox: use rustc.llvmPackages.stdenv with bintools

Currently `clangUseLLVM` is broken since it uses libcxx and compiler-rt but
also specifies `--gcc-toolchain`, which leads to weird compile errors when
including C++ headers.
This commit is contained in:
oxalica 2021-11-13 21:32:18 +08:00 committed by sterni
parent 4db5f307b0
commit f857492a19

View file

@ -110,7 +110,10 @@ let
# When LTO for Darwin is fixed, the following will need updating as lld
# doesn't work on it. For now it is fine since ltoSupport implies no Darwin.
buildStdenv = if ltoSupport
then overrideCC stdenv llvmPackages.clangUseLLVM
# LTO requires LLVM bintools including ld.lld and llvm-ar.
then overrideCC llvmPackages.stdenv (llvmPackages.stdenv.cc.override {
inherit (llvmPackages) bintools;
})
else stdenv;
# --enable-release adds -ffunction-sections & LTO that require a big amount of