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 0.10.0 #114382

Closed
wants to merge 4 commits into from
Closed

zig 0.10.0 #114382

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions Formula/zig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ class Zig < Formula
desc "Programming language designed for robustness, optimality, and clarity"
homepage "https://ziglang.org/"
license "MIT"
revision 2
head "https://github.com/ziglang/zig.git", branch: "master"

stable do
url "https://ziglang.org/download/0.9.1/zig-0.9.1.tar.xz"
sha256 "38cf4e84481f5facc766ba72783e7462e08d6d29a5d47e3b75c8ee3142485210"
depends_on "llvm@13" => :build
url "https://ziglang.org/download/0.10.0/zig-0.10.0.tar.xz"
sha256 "d8409f7aafc624770dcd050c8fa7e62578be8e6a10956bca3c86e8531c64c136"

on_macos do
# We need to make sure there is enough space in the MachO header when we rewrite install names.
# https://github.com/ziglang/zig/issues/13388
patch :DATA
end
end

bottle do
Expand All @@ -19,12 +24,11 @@ class Zig < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "95dbaeaabf3cc63df04c8fa46a19f74ef17e7f67cfeb7bfe0dd1e6be99cb399b"
end

head do
url "https://github.com/ziglang/zig.git", branch: "master"
depends_on "llvm" => :build
end

depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on macos: :big_sur # https://github.com/ziglang/zig/issues/13313
depends_on "z3"
depends_on "zstd"
uses_from_macos "ncurses"
uses_from_macos "zlib"

Expand Down Expand Up @@ -61,3 +65,17 @@ def install
assert_equal "Hello, world!", shell_output("./hello")
end
end

__END__
diff --git a/build.zig b/build.zig
index e5e80b4..1da6892 100644
--- a/build.zig
+++ b/build.zig
@@ -154,6 +154,7 @@ pub fn build(b: *Builder) !void {

exe.stack_size = stack_size;
exe.strip = strip;
+ exe.headerpad_max_install_names = true;
exe.sanitize_thread = sanitize_thread;
exe.build_id = b.option(bool, "build-id", "Include a build id note") orelse false;
exe.install();