clang: Fix linking with -flto

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2014-02-02 20:39:16 -05:00
parent 06ef22bcdd
commit 134546bca2

View File

@ -27,6 +27,9 @@ stdenv.mkDerivation {
(stdenv.lib.optional (stdenv.gcc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include") ++
(stdenv.lib.optional (stdenv.gcc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}");
# Clang expects to find LLVMgold in its own prefix
postInstall = "ln -sv ${llvm}/lib/LLVMgold.so $out/lib";
passthru.gcc = stdenv.gcc.gcc;
enableParallelBuilding = true;