valgrind: fix building with llvm#329995
Conversation
|
New issue found with x86_64, works on aarch64 though: |
5979f31 to
414a45d
Compare
64c07c2 to
69e7ad1
Compare
|
Now valgrind is failing because of this: |
69e7ad1 to
64b61ce
Compare
|
This PR now builds again. |
|
Sorry about the conflict with the other PR @RossComputerGuy. do you think we could instead add a |
Yeah, having the ability to turn off sanitizers or having a |
|
@RossComputerGuy Yeah I would prefer to always building the sanitizers in a separate derivation. Ideally that would not be another compiler-rt but just be the santizers, linking compiler-rt/libc/etc. as needed, but that may require some LLVM-side CMake work to do well. |
How exactly would that look like? Would we have a |
|
@RossComputerGuy See https://github.com/llvm/llvm-project/blob/0edafc461f5f98b2ed5d2d621e1d9de70ccbd4e5/compiler-rt/CMakeLists.txt#L42-L64 We can enable/disable things fairly independently. Perhaps easier than I thought. (What I would like to advocate they do however is break the stuff into proper separate packages that can be built together with the stuff that libc++ libc++abi and libunwind use, rather than one mega-package that we can split up with enable/disable flags.) |
|
@Ericson2314 So based on your previous comments, is there anything blocking this PR or what should we do exactly? I would like to see this PR come in so Mesa can build under LLVM. |
64b61ce to
ec5f27d
Compare
ec5f27d to
52ee4b6
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
52ee4b6 to
748fab9
Compare
|
Updating this PR, for whatever reason resetting back to 52ee4b6141beeab91dea471b09ec4036465bbc73 doesn't work. |
|
Fixed now |
419271d to
832ed2a
Compare
|
Rebased to hopefully fix CI |
832ed2a to
3552ede
Compare
| inherit (llvmPackages.compiler-rt-no-libc.stdenv.hostPlatform.parsed) cpu; | ||
| }; | ||
| useLLVM = false; | ||
| }; |
There was a problem hiding this comment.
Why do we need a custom hostPlatform? To disable sanitizers? Surely there's a better way to do that.
There was a problem hiding this comment.
I think so, I don't remember since this PR comes from forever ago.
| ( | ||
| f: p: { | ||
| hardeningDisable = p.hardeningDisable or [ ] ++ [ "stackprotector" ]; | ||
| } |
There was a problem hiding this comment.
If we have to disable stackprotector based on either the hostPlatform or doFakeLibgcc, that should happen centrally in the compiler-rt expression so it doesn't need to be repeated every time somebody wants to override one of those.
There was a problem hiding this comment.
No, this is blocked by source-highlight and LLVM's unwind being broken. I haven't had time to jump into it. source-highlight will require a new version upstream since it needs a newer libtool and we cant inject one without using an already dropped autotools version.
| configureFlags = lib.optional stdenv.hostPlatform.isx86_64 "--enable-only64bit"; | ||
|
|
||
| doCheck = true; | ||
| # Some tests fail on aarch64 and x86_64 under LLVM. |
There was a problem hiding this comment.
Why? For reasons that should be reported upstream, or not? Can we disable just those tests? And why are we listing platforms? Are there platforms it doesn't fail on with LLVM?
There was a problem hiding this comment.
I remember some tests just breaking entirely. I tried looking on Bugzilla but I don't see anything reported for it. I'm trying to build things right now to rediscover what I did.
Description of changes
Discovered in https://github.com/RossComputerGuy/nixpkgs-llvm-ws/runs/27931320260
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.