nixpkgs-suyu/pkgs/development
sternenseemann 3530837417 llvmPackages*.clang: fix linker invocation with LLVMgold plugin
When using GNU binutils, clang passes the LLVMgold.so plugin to the
linker for certain operations that require special support in the linker
like doing link time optimization (LTO). When passing the plugin to the
linker's command line, clang assumes that llvm and itself are installed
in the same prefix and thus `/path/to/clang/bin/../lib/LLVMgold.so` is
the plugin.

Since we install clang and llvm to separate store paths, this assumption
does not hold. When clang-unwrapped only had a single output, we worked
around this issue by symlinking `$out/lib/LLVMgold.so` to
`${llvm}/lib/LLVMgold.so`. However since we split all llvm packages into
multiple outputs clang's `$out` no longer has a lib directory and clang
can't discover clangs lib output on its own. As a result LTO was broken.

Instead of introducing yet another hack and having a symlink to
LLVMgold.so in `$out/lib` (despite having `$lib/lib` as well), we patch
clang to use a hard coded path to `${libllvm.lib}/lib` for discovering
`LLVMgold.so`.

Resolves #123361.
2021-05-18 16:15:03 +02:00
..
androidndk-pkgs
arduino arduino-cli: 0.12.1 -> 0.18.1 ; fix darwin build 2021-05-16 10:22:12 +09:00
beam-modules erlang-ls: add erlang to buildInputs 2021-05-17 10:26:48 +09:00
bower-modules/generic
chez-modules
compilers llvmPackages*.clang: fix linker invocation with LLVMgold plugin 2021-05-18 16:15:03 +02:00
coq-modules
dhall-modules
dotnet-modules python-language-server: cleanup deps, add missing phase hooks 2021-05-15 16:20:43 -07:00
em-modules/generic
gnuradio-modules
go-modules
go-packages
guile-modules
haskell-modules haskellPackages.taffybar: add rvl to meta.maintainers 2021-05-13 10:01:51 +10:00
idris-modules
interpreters Merge remote-tracking branch 'origin/master' into staging-next 2021-05-16 18:27:14 -07:00
java-modules
libraries Merge master into staging-next 2021-05-17 06:22:23 +00:00
lisp-modules
lua-modules
misc
mobile mkShell: introduce packages argument (#122180) 2021-05-13 19:17:29 +02:00
node-packages netlify-cli: fix build 2021-05-13 10:51:17 -07:00
ocaml-modules
octave-modules
perl-modules perlPackages.TextBibTeX: use lib instead of lib64 on aarch64 (#122567) 2021-05-15 10:04:35 +02:00
pharo
php-packages phpPackages.psysh: 0.10.4 -> 0.10.8 2021-05-14 15:43:38 +02:00
pure-modules
python-modules Merge master into staging-next 2021-05-17 06:22:23 +00:00
r-modules
ruby-modules
tools Merge master into staging-next 2021-05-17 06:22:23 +00:00
web Merge branch 'master' into staging-next 2021-05-14 22:27:34 +02:00