Skip to content
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 6: init #34457

Merged
merged 12 commits into from Mar 8, 2018
Merged

llvm 6: init #34457

merged 12 commits into from Mar 8, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 31, 2018

Motivation for this change

Start building and testing LLVM 6, currently on RC1.

Helps ensure release doesn't have bugs re:NixOS / our projects, and hopefully enables us to at least make LLVM 6 available after final release and update the default shortly after.

Anyway, test test please! :)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@grahamc
Copy link
Member

grahamc commented Jan 31, 2018

I introduced a failure in the evaluator today, sorry about that. Testing for a fix:

@GrahamcOfBorg eval

@dtzWill
Copy link
Member Author

dtzWill commented Feb 1, 2018

@GrahamcOfBorg build clang_6 lld_6 lldb_6

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file lib/Support/Unix/Memory.inc.rej
builder for '/nix/store/i92fqldk238rl07g26bkjqxvkv94fra8-llvm-6.0.0rc1.drv' failed with exit code 1
cannot build derivation '/nix/store/b5jrr1h8b46ygimw9lp4drcnxn87hw8h-clang-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/irx1p6ad17rd4lnjzipyxk3m1d8209fm-clang-manpages-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/y1a9xzcngy03br51sbprglql0i5nb8ly-lld-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/6gz68lw4cxn3hdn07rx5k7darl2xw61p-clang-wrapper-6.0.0rc1.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/8r11d5hv3rqxv17038nj2fwkhw9n8wqx-lldb-6.0.0rc1.drv': 2 dependencies couldn't be built
error: build of '/nix/store/6gz68lw4cxn3hdn07rx5k7darl2xw61p-clang-wrapper-6.0.0rc1.drv', '/nix/store/8r11d5hv3rqxv17038nj2fwkhw9n8wqx-lldb-6.0.0rc1.drv', '/nix/store/y1a9xzcngy03br51sbprglql0i5nb8ly-lld-6.0.0rc1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

[ 19%] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/InstructionSimplify.cpp.o
[ 19%] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/Interval.cpp.o
[ 19%] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/IntervalPartition.cpp.o
building of '/nix/store/6sxf163jcv8cam64iv64dj0pc5jhz0g3-llvm-6.0.0rc1.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/pkkf8vz9gxjbd064w8jz3z5mhc5zx2y0-clang-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/66swviph1yyx87n8kp0wg43d2s105lyj-clang-manpages-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/x3i2pb5vn93bc3alvj5rg6vhavpi5l8g-lld-6.0.0rc1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1dfaybl6hm8p12mqbids4lz6aqbivg42-clang-wrapper-6.0.0rc1.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/nkx8mn730kg13wx16vqf7wfp13javjwg-lldb-6.0.0rc1.drv': 2 dependencies couldn't be built
error: build of '/nix/store/1dfaybl6hm8p12mqbids4lz6aqbivg42-clang-wrapper-6.0.0rc1.drv', '/nix/store/nkx8mn730kg13wx16vqf7wfp13javjwg-lldb-6.0.0rc1.drv', '/nix/store/x3i2pb5vn93bc3alvj5rg6vhavpi5l8g-lld-6.0.0rc1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

[ 40%] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/AMDGPULibCalls.cpp.o
[ 40%] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/AMDGPULibFunc.cpp.o
[ 40%] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/AMDGPULowerIntrinsics.cpp.o
building of ‘/nix/store/03ikphp5a22crk0m6vmy231ydwy8qpq1-llvm-6.0.0rc1.drv’ timed out after 3600 seconds
cannot build derivation ‘/nix/store/4w3r4s8s4yy93sd3745yy68xzx0n3h83-clang-6.0.0rc1.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/77h0vadd54g207r22m5rjzqaapvsgbg4-clang-manpages-6.0.0rc1.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/aaarl8abw7dz2lpj193wamv6s9hz16kg-lld-6.0.0rc1.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/4cigd5f184c80nr3sdq7fyzfh383xk7v-clang-wrapper-6.0.0rc1.drv’: 2 dependencies couldn't be built
cannot build derivation ‘/nix/store/3w8gb4v5bia2wlg4c037cimk1lmssiyk-lldb-6.0.0rc1.drv’: 2 dependencies couldn't be built
error: build of ‘/nix/store/3w8gb4v5bia2wlg4c037cimk1lmssiyk-lldb-6.0.0rc1.drv’, ‘/nix/store/4cigd5f184c80nr3sdq7fyzfh383xk7v-clang-wrapper-6.0.0rc1.drv’, ‘/nix/store/aaarl8abw7dz2lpj193wamv6s9hz16kg-lld-6.0.0rc1.drv’ failed

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything builds on darwin.

mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';

outputs = [ "out" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need something similar to #33871 to get python out of the closure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Added.


llvm = llvmPackages.llvm;

llvm_6 = llvmPackages_6.llvm;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep exposing all of these top-level?

in stdenv.mkDerivation (rec {
name = "llvm-${version}";

unpackPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cleaned this up on a test branch recently, let me see if I can find it.

Copy link
Member Author

@dtzWill dtzWill Feb 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all need to be refactored, was thinking of starting with refactoring 5 and 6 (possibly 4 and earlier) since they especially are so similar.

Soon (tm)!

EDIT: err, but that's not to say cleanup would be very welcome in the meantime! 👍

@dtzWill
Copy link
Member Author

dtzWill commented Feb 8, 2018

rc2 has been tagged, but appears they don't upload the source tarballs until the "release testers" all build and upload binaries, so should be available in a few days. Not worth bothering with grabbing off of SVN in the meantime, IMO.

@dtzWill
Copy link
Member Author

dtzWill commented Feb 13, 2018

rc2 has been out for a bit, but I haven't gotten to updating this yet, sorry!

@LnL7
Copy link
Member

LnL7 commented Feb 13, 2018

I don't think this is urgent since the build works.

@dtzWill
Copy link
Member Author

dtzWill commented Feb 19, 2018

rebased and fixed merge conflicts. Added testing variants like we have for other versions.

Will be adding musl compat fixes too, now that they're in master as well 👍.

@dtzWill
Copy link
Member Author

dtzWill commented Feb 19, 2018

Postponing musl fixes here while resolving discussion about musl ...

EDIT: nevermind, useful enough for my own purposes to justify :D.

@dtzWill dtzWill force-pushed the feature/llvm-6 branch 2 times, most recently from 81f3746 to 2554496 Compare February 26, 2018 19:59
@dtzWill
Copy link
Member Author

dtzWill commented Feb 26, 2018

rebased, rc2 -> rc3 \o/

@dtzWill
Copy link
Member Author

dtzWill commented Mar 2, 2018

Hold on to your lugnuts! LLVM 6 final has been tagged:

http://lists.llvm.org/pipermail/release-testers/2018-March/000667.html

Will be a few more days for them to prepare the release and official source tarballs but .... soon!!

@LnL7
Copy link
Member

LnL7 commented Mar 3, 2018

Great!

@dtzWill dtzWill changed the title [WIP] llvm 6 llvm 6: init Mar 8, 2018
@dtzWill
Copy link
Member Author

dtzWill commented Mar 8, 2018

Release notes: http://releases.llvm.org/6.0.0/docs/ReleaseNotes.html

Note this adds support for "retpolines", which may be of interest to those using clang-based stdenv's.

@dtzWill dtzWill merged commit b09b557 into NixOS:master Mar 8, 2018
@dtzWill dtzWill deleted the feature/llvm-6 branch March 8, 2018 18:41
dtzWill added a commit that referenced this pull request Mar 8, 2018
llvm 6: init

(cherry picked from commit b09b557)
@data-man
Copy link

data-man commented Mar 9, 2018

Sorry, but how do I use the clang 6?
I just started using the NixOS.

@dtzWill
Copy link
Member Author

dtzWill commented Mar 9, 2018

I don't think it's hit any channels yet, so in the meantime you can use something like this:

$ NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz nix-shell -p clang_6

and use clang within that shell. Note that "installing" clang generally doesn't work as you may expect, there's an issue discussing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants