Skip to content

Commit

Permalink
llvmPackages_15: updates for LLVM 15
Browse files Browse the repository at this point in the history
None of the patches required any touch-up; the only change of note is:
  - due to changes in the libc++/libc++abi build
    (https://reviews.llvm.org/D120719 and https://reviews.llvm.org/D131037)
    we have to add an extra build option to the libc++ header only
    build that sidesteps bits of the libc++ build config that assume
    libc++-abi is present in the build:
    https://github.com/llvm/llvm-project/blob/4f827318e3e8ccab4ff131e06234caa827e91e4e/libcxx/src/CMakeLists.txt#L255-L256

Rather than maintaining a precise set of build options that let us dodge
referencing libc++-abi variables in the libc++ header only build, we set
`LIBCXX_CXX_ABI` to `none`, as suggested by @lovesegfault.

More discussion about this here: NixOS#194634 (comment)

Co-authored-by: Bernardo Meurer <[email protected]>
  • Loading branch information
rrbutani and lovesegfault committed Jan 8, 2023
1 parent 8c4b8b5 commit 60ecb20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkgs/development/compilers/llvm/15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}:

let
release_version = "14.0.6";
release_version = "15.0.6";
candidate = ""; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
rev = ""; # When using a Git commit
Expand All @@ -31,7 +31,7 @@ let
owner = "llvm";
repo = "llvm-project";
rev = if rev != "" then rev else "llvmorg-${version}";
sha256 = "sha256-vffu4HilvYwtzwgq+NlS26m65DGbp6OSSne2aje1yJE=";
sha256 = "sha256-Zt/+J6AToJmimlsZPd1huuET6EkNYa6GKgkUFw0Gco8=";
};

llvm_meta = {
Expand Down Expand Up @@ -88,7 +88,7 @@ let
python3 = pkgs.python3; # don't use python-boot
});

# TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
# Needs package for spinhx-automodapi: https://github.com/astropy/sphinx-automodapi
# lldb-manpages = lowPrio (tools.lldb.override {
# enableManpages = true;
# python3 = pkgs.python3; # don't use python-boot
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/llvm/15/libcxx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ stdenv.mkDerivation rec {

cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libcxx"
"-DLIBCXX_CXX_ABI=${lib.optionalString (!headersOnly) "system-"}libcxxabi"
"-DLIBCXX_CXX_ABI=${if headersOnly then "none" else "system-libcxxabi"}"
] ++ lib.optional (!headersOnly) "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${libcxxabi.dev}/include/c++/v1"
++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
Expand Down

0 comments on commit 60ecb20

Please sign in to comment.