3
0
Fork 0
forked from mirrors/nixpkgs

llvm-bintools: passthru targetPrefix.

This is expected e.g. by the GHC cross-compilation code
This commit is contained in:
Shea Levy 2022-05-03 15:11:15 -04:00
parent 5c0654f262
commit 15aa32e082
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
3 changed files with 21 additions and 3 deletions

View file

@ -5,7 +5,13 @@ let
if stdenv.hostPlatform != stdenv.targetPlatform
then "${stdenv.targetPlatform.config}-"
else "";
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
in runCommand "llvm-binutils-${version}" {
preferLocalBuild = true;
passthru = {
isLld = true;
targetPrefix = prefix;
};
} (''
mkdir -p $out/bin
for prog in ${lld}/bin/*; do
ln -s $prog $out/bin/${prefix}$(basename $prog)

View file

@ -5,7 +5,13 @@ let
if stdenv.hostPlatform != stdenv.targetPlatform
then "${stdenv.targetPlatform.config}-"
else "";
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
in runCommand "llvm-binutils-${version}" {
preferLocalBuild = true;
passthru = {
isLld = true;
targetPrefix = prefix;
};
} (''
mkdir -p $out/bin
for prog in ${lld}/bin/*; do
ln -s $prog $out/bin/${prefix}$(basename $prog)

View file

@ -5,7 +5,13 @@ let
if stdenv.hostPlatform != stdenv.targetPlatform
then "${stdenv.targetPlatform.config}-"
else "";
in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; passthru.isLld = true; } (''
in runCommand "llvm-binutils-${version}" {
preferLocalBuild = true;
passthru = {
isLld = true;
targetPrefix = prefix;
};
} (''
mkdir -p $out/bin
for prog in ${lld}/bin/*; do
ln -s $prog $out/bin/${prefix}$(basename $prog)