New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm-4: small improvements on Darwin and elsewhere #24014
Conversation
Split outputs because there's no point in keeping a reference to Python and it causes trouble during the Darwin stdenv bootstrap. There's also an unnecessary dependency on LLVM in libc++ which causes us to rebuild LLVM several more times than necessary during bootstrap, and an awkward dependency on XPC in the TSAN that we turn off. This is in preparation for using LLVM 4 in the Darwin stdenv and by default across nixpkgs.
@copumpkin, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dtzWill to be a potential reviewer. |
@@ -29,12 +29,23 @@ let | |||
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp | |||
''; | |||
|
|||
outputs = [ "out" "python" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we splitting outputs by default nowadays? Should I include other outputs here?
Trying this on NixOS : $ nix-shell -p nox --run "nox-review -k pr 24014"
[...]
error: while querying the derivation named ‘freecell-solver-4.8.0’:
while evaluating the attribute ‘nativeBuildInputs’ of the derivation ‘freecell-solver-4.8.0’ at /home/demo/.nox/nixpkgs/pkgs/games/freecell-solver/default.nix:8:3:
[...] |
@c0bw3b that sounds like someone broke evaluation somewhere? |
Yes. I get the same error when running |
Rerun /nix/store/m9pnn0bnaaigjln132d2kh8xsyhp10vl-clang-wrapper-4.0.0
Result in /run/user/1000/nox-review-tj77hy_q
total 0
lrwxrwxrwx 1 demo users 63 18 mars 18:48 result -> /nix/store/m9pnn0bnaaigjln132d2kh8xsyhp10vl-clang-wrapper-4.0.0 Checking the resulting derivation : [demo@nixos:~]$ tree -ah /nix/store/m9pnn0bnaaigjln132d2kh8xsyhp10vl-clang-wrapper-4.0.0
/nix/store/m9pnn0bnaaigjln132d2kh8xsyhp10vl-clang-wrapper-4.0.0
├── [4.0K] bin
│ ├── [ 64] as -> /nix/store/k8c23rwbrril65rmm7z1036h2makk012-binutils-2.28/bin/as
│ ├── [ 7] c++ -> clang++
│ ├── [ 5] cc -> clang
│ ├── [5.7K] clang
│ ├── [5.8K] clang++
│ ├── [5.7K] cpp
│ ├── [5.5K] ld
│ ├── [5.6K] ld.bfd
│ └── [5.6K] ld.gold
└── [4.0K] nix-support
├── [1.7K] add-flags.sh
├── [2.2K] add-hardening.sh
├── [ 63] cc-cflags
├── [ 63] cc-ldflags
├── [ 80] dynamic-linker
├── [ 233] libc-cflags
├── [ 61] libc-ldflags
├── [ 96] libc-ldflags-before
├── [ 56] orig-cc
├── [ 55] orig-libc
├── [ 59] orig-libc-dev
├── [ 1] propagated-native-build-inputs
├── [ 173] propagated-user-env-packages
├── [1.4K] setup-hook
└── [1.2K] utils.sh
2 directories, 24 files
[demo@nixos:~]$ /nix/store/m9pnn0bnaaigjln132d2kh8xsyhp10vl-clang-wrapper-4.0.0/bin/clang --version
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/m0wld6jq7xw2cnchrxijyri0xw44svpq-clang-4.0.0/bin
|
@c0bw3b thanks for checking! The build also ran fine on my other Linux machine, so I'll merge. |
|
Not runtime dependency (as discussed on IRC), but perhaps the supporting python bits for scan-view should be moved as well?
|
Split outputs because there's no point in keeping a reference to Python and it causes trouble during the Darwin stdenv bootstrap. There's also an unnecessary dependency on LLVM in libc++ which causes us to rebuild LLVM several more times than necessary during bootstrap, and an awkward
dependency on XPC in the TSAN that we turn off.
I'm getting an internal g++ error when I try to compile clang 4 with this on NixOS. Can someone give it a go on their machine and see if it's just me? I can't see how I'd cause the internal error with the changes I made...Turns out the internal error was due to being memory-constrained. It worked fine on another machine with more memory.Motivation for this change
This is in preparation for using LLVM 4 in the Darwin stdenv and by default across nixpkgs.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)