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

zig: upgrade to 0.6.0 #85183

Merged
merged 3 commits into from Apr 17, 2020
Merged

zig: upgrade to 0.6.0 #85183

merged 3 commits into from Apr 17, 2020

Conversation

Xe
Copy link
Contributor

@Xe Xe commented Apr 13, 2020

Motivation for this change

See Zig 0.6.0 release notes

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/development/compilers/zig/default.nix Outdated Show resolved Hide resolved
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
Comment on lines 23 to 28
patches = [ ./llvm10_polly.patch ];

postPatch = ''
export llvm_extras=-Wl,${llvmPackages.llvm}/lib/LLVMPolly.so
substituteAllInPlace CMakeLists.txt
'';
Copy link
Member

Choose a reason for hiding this comment

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

I think something like this should work (will also need to add substituteAll to the args):

  patches = [
    (substituteAll {
        src = ./llvm10_polly.patch;
        llvm_extras = "-Wl,${llvmPackages.llvm}/lib/LLVMPolly.so";
    })
  ];

@ofborg ofborg bot requested a review from andrewrk April 13, 2020 22:52
@andrewrk
Copy link
Member

Why does it keep re-requesting my review?

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

LGTM. ldd $(which zig) also shows LLVMPolly.so, so my suggestion doesn't appear to have screwed anything up ^^. Built and ran the "Hello World" example just fine.

[5 built, 10 copied (907.4 MiB), 119.7 MiB DL]
https://github.com/NixOS/nixpkgs/pull/85183
1 package built:
zig

@grahamc grahamc merged commit e42312e into NixOS:master Apr 17, 2020
@Xe Xe deleted the zig-0.6.0 branch April 17, 2020 19:22
@worldofpeace
Copy link
Contributor

just for future reference, updates commit messages are always like

zig: 0.5.0 -> 0.6.0

See https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes

@sikmir
Copy link
Member

sikmir commented Jul 20, 2020

@andrewrk Build fails on darwin:

/private/var/folders/wf/qxrs82v946n91pb5s71n3dy80000gp/T/nix-build-zig-0.6.0.drv-0/source/src/os.cpp:1105:9: error: use of undeclared identifier 'futimens'
    if (futimens(file, times) == -1) {
        ^
1 error generated.
make[2]: *** [CMakeFiles/zigcompiler.dir/build.make:304: CMakeFiles/zigcompiler.dir/src/os.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:225: CMakeFiles/zigcompiler.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
builder for '/nix/store/b7w0k884rcg5f0nlwm1jahxazgiillbw-zig-0.6.0.drv' failed with exit code 2
error: build of '/nix/store/b7w0k884rcg5f0nlwm1jahxazgiillbw-zig-0.6.0.drv' failed

My macOS version:

$ sw_vers -productVersion
10.13.6

According to https://ziglang.org/#Support-Table, macOS 10.13+ is supported.

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

6 participants