llvmPackages_15: apply some patches from llvmPackages_14, part 2

See https://github.com/NixOS/nixpkgs/pull/194634#issue-1398202534 for
details.

PRs:
  - #211401
  - #211161
  - #206742
  - #211687
This commit is contained in:
Rahul Butani 2023-01-27 12:38:44 -08:00
parent 81ef82a029
commit 9bd92679c2
No known key found for this signature in database
3 changed files with 18 additions and 7 deletions

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)
@ -15,15 +20,21 @@ in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
done
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
ln -s ${llvm}/bin/llvm-debuginfod $out/bin/${prefix}debuginfod
ln -s ${llvm}/bin/llvm-debuginfod-find $out/bin/${prefix}debuginfod-find
ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-rc $out/bin/${prefix}windres
ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
ln -s ${lld}/bin/lld $out/bin/${prefix}ld
''

View File

@ -36,7 +36,7 @@ let
llvm_meta = {
license = lib.licenses.ncsa;
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
maintainers = lib.teams.llvm.members;
platforms = lib.platforms.all;
};

View File

@ -57,7 +57,7 @@ in stdenv.mkDerivation (rec {
propagatedBuildInputs = [ ncurses zlib ];
checkInputs = [ which ];
nativeCheckInputs = [ which ];
patches = [
./gnu-install-dirs.patch