nixpkgs/pkgs/development/compilers/llvm/15
Rahul Butani ca59a201ca
llvmPackages_15.libcxx: use clang 15 instead of the stdenv's compiler
libc++ has switched to using `__attribute__((using_if_exists))` to handle
incomplete libc implementations; see: a9c9183ca4

These essentially require a modern C++ compiler (clang gained support in
LLVM 13: 369c648399,
gcc appears to not have support yet: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=105584).

Previously this was not an issue for us (despite the transition happening
around LLVM 13) but something about the changes to the libc++/libc++-abi
build has made it so that on platforms with incomplete libc impls (i.e.
Darwin is missing `quick_exit`/`at_quick_exit`) we error during the `libcxx-abi`
build when the stdenv's (older, not supporting `using_if_exists`) compiler
tries to import libc symbols that aren't present.

The libc++ docs suggest we use a modern compiler to build libc++ anyways
(https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support)
so this commit uses stdenv's containing the package set's clang to build
libcxx/libcxx-abi.

This is similar to how libc++ bootstrapping builds (https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build)
work.
2023-01-27 13:29:21 -08:00
..
bintools llvmPackages_15: apply some patches from llvmPackages_14, part 2 2023-01-27 13:29:21 -08:00
clang
compiler-rt llvmPackages_15.compiler_rt: apply #196909 to LLVM 15 2023-01-27 13:29:21 -08:00
libcxx llvmPackages_15: apply #211230 to llvmPackages_15 2023-01-27 13:29:21 -08:00
libcxxabi llvmPackages_15.libcxx: use clang 15 instead of the stdenv's compiler 2023-01-27 13:29:21 -08:00
libunwind
lld
lldb
llvm llvmPackages_15: apply some patches from llvmPackages_14, part 2 2023-01-27 13:29:21 -08:00
openmp
default.nix llvmPackages_15.libcxx: use clang 15 instead of the stdenv's compiler 2023-01-27 13:29:21 -08:00