Skip to content

Commit

Permalink
bintools: add isGNU and isLLVM attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssais authored and sternenseemann committed Jan 20, 2023
1 parent 10222e1 commit f5e63a0
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 10 deletions.
3 changes: 2 additions & 1 deletion pkgs/build-support/bintools-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/10/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/11/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/12/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/13/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/14/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/7/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/8/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/9/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkgs/development/compilers/llvm/git/bintools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f5e63a0

Please sign in to comment.