1 { runCommand, stdenv, llvm, lld, version }:
5 if stdenv.hostPlatform != stdenv.targetPlatform
6 then "${stdenv.targetPlatform.config}-"
8 in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
10 for prog in ${lld}/bin/*; do
11 ln -s $prog $out/bin/${prefix}$(basename $prog)
13 for prog in ${llvm}/bin/*; do
14 ln -sf $prog $out/bin/${prefix}$(basename $prog)
17 ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
18 ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
19 ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
20 ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
21 ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
22 ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
23 ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
24 ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
25 ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
26 ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
28 ln -s ${lld}/bin/lld $out/bin/${prefix}ld