Conversation
|
@a-n-n-a-l-e-e Alright, I'll rebase this with that. I didn't see that since I'm at NixCon NA and there's WiFi issues here lol. |
36b2de6 to
bd9409f
Compare
|
are these files copied from llvm_git or llvm_17? looks like llvm_17. |
you might want to be on staging-next and then rebase to master once it merges into master because c++ code will not compile with this toolchain on master currently. |
|
@a-n-n-a-l-e-e Yes it is copied from 17, I couldn't pull almost anything at NixCon NA but now that I'm back home, I can do that. I'll trying to do that here in a bit. |
bd9409f to
0fae7b1
Compare
0fae7b1 to
ab0e81b
Compare
7e5003e to
8b5a628
Compare
so i think standalone libunwind is fine libcxx just errors when so the change in libcxx/default.nix would be.diff --git a/pkgs/development/compilers/llvm/18/libcxx/default.nix b/pkgs/development/compilers/llvm/18/libcxx/default.nix
index a865c27f4845..a071bcbf1e20 100644
--- a/pkgs/development/compilers/llvm/18/libcxx/default.nix
+++ b/pkgs/development/compilers/llvm/18/libcxx/default.nix
@@ -1,5 +1,5 @@
{ lib, stdenv, llvm_meta
-, monorepoSrc, runCommand, fetchpatch
+, monorepoSrc, runCommand
, cmake, lndir, ninja, python3, fixDarwinDylibNames, version
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else null
, libcxxrt, libunwind
@@ -19,10 +19,10 @@ let
# Note: useLLVM is likely false for Darwin but true under pkgsLLVM
useLLVM = stdenv.hostPlatform.useLLVM or false;
- cxxabiCMakeFlags = lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [
- "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
- ] ++ lib.optionals (lib.versionAtLeast version "18" && !(useLLVM && !stdenv.hostPlatform.isWasm)) [
+ cxxabiCMakeFlags = [
"-DLIBCXXABI_USE_LLVM_UNWINDER=OFF"
+ ] ++ lib.optionals (useLLVM && !stdenv.hostPlatform.isWasm) [
+ "-DLIBCXXABI_ADDITIONAL_LIBRARIES=unwind"
] ++ lib.optionals stdenv.hostPlatform.isWasm [
"-DLIBCXXABI_ENABLE_THREADS=OFF"
"-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
@@ -86,18 +86,6 @@ stdenv.mkDerivation rec {
patches = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [
# https://github.com/llvm/llvm-project/issues/64226
./0001-darwin-10.12-mbstate_t-fix.patch
- ] ++ lib.optionals (cxxabi == null && lib.versionAtLeast version "18") [
- # Allow building libcxxabi alone when using LLVM unwinder
- (fetchpatch {
- url = "https://github.com/llvm/llvm-project/commit/77610dd10454e87bb387040d2b51100a17ac5755.patch";
- revert = true;
- hash = "sha256-jFbC3vBY3nKfjknJ7UzaPyoy0iSYdD3+jUmOFeOaVcA=";
- })
- (fetchpatch {
- url = "https://github.com/llvm/llvm-project/commit/48e5b5ea92674ded69b998cf35724d9012c0f57d.patch";
- revert = true;
- hash = "sha256-WN63L4T3GxVozPZb6kx21AgNe4rwwSUOeeryIGsvQYY=";
- })
];
postPatch = '' |
097751e to
fecafc0
Compare
Alright, I've implemented this |
fecafc0 to
b7dca9f
Compare
|
Just fixed a conflict. |
b7dca9f to
5395902
Compare
|
the libunwind change in libcxx looks like it got reverted on the last update. |
|
I think once MLIR is added, these options should be enabled by default, with vulkan being optional. |
It looks to be present still. It was only needed for git. |
it should be in both. 18 is reverting two commits to make libunwind work the old way. |
5395902 to
5b4736b
Compare
Alright, done. |
ghost
left a comment
There was a problem hiding this comment.
diffed changes against llvm17. looks good. missing one patch in lld but perhaps it was already incorporated upstream.
There was a problem hiding this comment.
compared to llvm17 this is missing ./add-table-base.patch. is it no longer needed?
ghost
left a comment
There was a problem hiding this comment.
ok. diffed 18 against git. looks good except for libcxx/default.nix.
git/libcxx/default.nix is not correct and should be refreshed from the one from 18/libcxx/default.nix
also noticed that 18/libcxx/default.nix is missing a flag (comment inline) so that should be added as well.
pkgs/development/compilers/llvm/git/libcxx/fix-libunwind-runtime.patch
Outdated
Show resolved
Hide resolved
5b4736b to
c6c3e07
Compare
Works after changing `git/default.nix` to use `gitRelease` instead of `officialRelease`
Wont update the version attr
```
, gitRelease ? {
version = "15.0.0";
rev = "a5640968f2f7485b2aa4919f5fa68fd8f23e2d1f";
rev-version = "unstable-2022-26-07";
sha256 = "1sh5xihdfdn2hp7ds3lkaq1bfrl4alj36gl1aidmhlw65p5rdvl7";
}
```
|
Added @Artturin's update-git.py commit as they stated on Matrix. |
Description of changes
Closes #293866
Adding LLVM 18 to Nixpkgs, opening as a draft while I work on this.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.