3
0
Fork 0
forked from mirrors/nixpkgs

firefox: enable cross-language LTO

This commit is contained in:
oxalica 2021-11-19 23:44:10 +08:00
parent 8d4bef7124
commit a343380d9d
No known key found for this signature in database
GPG key ID: CED392DE0C483D00

View file

@ -273,7 +273,7 @@ buildStdenv.mkDerivation ({
# https://bugzilla.mozilla.org/show_bug.cgi?id=1538724
# elf-hack is broken when using clang+lld:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
++ lib.optional ltoSupport "--enable-lto"
++ lib.optional ltoSupport "--enable-lto=cross" # Cross-language LTO.
++ lib.optional (ltoSupport && (buildStdenv.isAarch32 || buildStdenv.isi686 || buildStdenv.isx86_64)) "--disable-elf-hack"
++ lib.optional (ltoSupport && !buildStdenv.isDarwin) "--enable-linker=lld"