bintools: add isGNU and isLLVM attributes

This commit is contained in:
Alyssa Ross 2023-01-19 21:39:04 +00:00 committed by sternenseemann
parent 10222e1e37
commit f5e63a0e9e
10 changed files with 56 additions and 10 deletions

View File

@ -25,6 +25,7 @@
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? bintools != null && bintools ? man
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? bintools.isGNU or false, isLLVM ? bintools.isLLVM or false
, buildPackages ? {}
, targetPackages ? {}
, useMacosReexportHack ? false
@ -108,7 +109,7 @@ stdenv.mkDerivation {
passthru = {
inherit targetPrefix suffixSalt;
inherit bintools libc nativeTools nativeLibc nativePrefix;
inherit bintools libc nativeTools nativeLibc nativePrefix isGNU isLLVM;
emacsBufferSetup = pkgs: ''
; We should handle propagation here too

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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