LLVM: Always pass host/target info to compiler-rt/libstdcxxClang
This commit is contained in:
committed by
John Ericson
parent
79374b9870
commit
74f3b25896
@@ -1,4 +1,4 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@@ -7,6 +7,7 @@
|
||||
let
|
||||
release_version = "5.0.2";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
|
||||
@@ -56,7 +57,12 @@ let
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
extraBuildCommands = ''
|
||||
echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
|
||||
'' + mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
libcxxClang = wrapCCWith rec {
|
||||
|
||||
Reference in New Issue
Block a user