@ -141,12 +141,10 @@ let
bootBintools = null ;
} ;
buildStdenv = if ltoSupport
# LTO requires LLVM bintools including ld.lld and llvm-ar.
then overrideCC llvmPackages . stdenv ( llvmPackages . stdenv . cc . override {
inherit ( llvmPackages ) bintools ;
} )
else stdenv ;
# LTO requires LLVM bintools including ld.lld and llvm-ar.
buildStdenv = overrideCC llvmPackages . stdenv ( llvmPackages . stdenv . cc . override {
inherit ( llvmPackages ) bintools ;
} ) ;
# Compile the wasm32 sysroot to build the RLBox Sandbox
# https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/
@ -289,7 +287,6 @@ buildStdenv.mkDerivation ({
" - - w i t h - s y s t e m - w e b p "
" - - w i t h - s y s t e m - z l i b "
]
++ lib . optional ( ! ltoSupport ) " - - w i t h - c l a n g - p a t h = ${ llvmPackages . clang } / b i n / c l a n g "
# LTO is done using clang and lld on Linux.
++ lib . optionals ltoSupport [
" - - e n a b l e - l t o = c r o s s " # Cross-Language LTO