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

wasi-libc 25 #200971

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
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
20 changes: 9 additions & 11 deletions Formula/w/wasi-libc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class WasiLibc < Formula
stable do
# Check the commit hash of `src/wasi-libc` corresponding to the latest tag at:
# https://github.com/WebAssembly/wasi-sdk
url "https://github.com/WebAssembly/wasi-libc/archive/1b19fc65ad84b223876c50dd4fcd7d5a08c311dc.tar.gz"
version "24"
sha256 "a9d5e43c80b5b82fa92325fd73f6f6112ba5631f005030e8d51350efd4c9e61d"
url "https://github.com/WebAssembly/wasi-libc/archive/574b88da481569b65a237cb80daf9a2d5aeaf82d.tar.gz"
version "25"
sha256 "7d11a801570972e7f32639eed3f8f7d0e997f276b3c85b7aa03283e1265e4b8e"

resource "WASI" do
# Check the commit hash of `tools/wasi-headers/WASI` from the commit hash above.
Expand All @@ -27,13 +27,12 @@ class WasiLibc < Formula
end

bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_sequoia: "baa8c0d028e3691de22e06d6e9958a61898ad0764ffac57441627bb941da6814"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "baa8c0d028e3691de22e06d6e9958a61898ad0764ffac57441627bb941da6814"
sha256 cellar: :any_skip_relocation, arm64_ventura: "baa8c0d028e3691de22e06d6e9958a61898ad0764ffac57441627bb941da6814"
sha256 cellar: :any_skip_relocation, sonoma: "baa8c0d028e3691de22e06d6e9958a61898ad0764ffac57441627bb941da6814"
sha256 cellar: :any_skip_relocation, ventura: "baa8c0d028e3691de22e06d6e9958a61898ad0764ffac57441627bb941da6814"
sha256 cellar: :any_skip_relocation, x86_64_linux: "32bf0d734a80239892bcaa7c605aea4021e2e45bd2b906231219ab743da488c0"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1"
sha256 cellar: :any_skip_relocation, arm64_ventura: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1"
sha256 cellar: :any_skip_relocation, sonoma: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1"
sha256 cellar: :any_skip_relocation, ventura: "89f102505760c8d6b154f1574e619e2755e2fd7ff878596ec6c49ea5b62e4da1"
sha256 cellar: :any_skip_relocation, x86_64_linux: "bbe27ea11d50c62ecfba2922e3a4ff27b16f215eeae08738413ef7f9b01d2a95"
end

depends_on "llvm" => [:build, :test]
Expand Down Expand Up @@ -77,7 +76,6 @@ def install

targets.each do |target|
system "make", *make_args, "TARGET_TRIPLE=#{target}", "install", *target_flags[target]
system "make", "clean"
end
end

Expand Down
16 changes: 9 additions & 7 deletions Formula/w/wasi-runtimes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ class WasiRuntimes < Formula
end

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "7026035613d58999acd72bc9b590b80bdd0b352a597300a0c2884f18548b34f8"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "cb8e96c987a2e8d3a6fa8a8401085a9a174ba7f75297251612d1edb5ae126edb"
sha256 cellar: :any_skip_relocation, arm64_ventura: "aeb30495d5dd74e9ea6b7f7f7628f487004e5eec9a10244416520b6458aa8ce4"
sha256 cellar: :any_skip_relocation, sonoma: "632db53359de79b38b9d169bff85cafc2cfc95da6510207c177e7f4f91ab449c"
sha256 cellar: :any_skip_relocation, ventura: "748e10bed323897a699b9b5cdc4a08f6dadf0887c0e0b52dcb062cfff44b9346"
sha256 cellar: :any_skip_relocation, x86_64_linux: "99be94110e08f849597fb5ed7844bac813173e31e0ed183fd257be11f533b9b1"
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_sequoia: "361664a76906963e268742fe6f0247f8be1e645db550b58265949f9d60ccaeda"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "4a280945c8efe98b1b9815fbbfe02dcaea3f8605e3e5cdf0c1c49bbc3e6b7ccf"
sha256 cellar: :any_skip_relocation, arm64_ventura: "d8f18d7be9d183d95c66845aeaa89304d35c2a807ccf0ff0adaf196f31475121"
sha256 cellar: :any_skip_relocation, sonoma: "6dd3bfe017c9e1464b0b9cc6277792d6aa93a16c8a665e0bb7c6f6ebe8565479"
sha256 cellar: :any_skip_relocation, ventura: "53dbcdefdca8b9b00c5af745e7998c2266e5874f608d6c225db6de985217129e"
sha256 cellar: :any_skip_relocation, x86_64_linux: "fdd04988b1b67eb851aa1e76f86c75029cbd6063b33e679ca1a26be89c8f5356"
end

depends_on "cmake" => :build
Expand Down Expand Up @@ -208,7 +209,8 @@ def install
system clang, "--target=#{target}", "-v", "test.c", "-o", "test-#{target}"
assert_equal "the answer is 42", shell_output("wasmtime #{testpath}/test-#{target}")

system "#{clang}++", "--target=#{target}", "-v", "test.cc", "-o", "test-cxx-#{target}"
pthread_flags = target.end_with?("-threads") ? ["-D_WASI_EMULATED_PTHREAD"] : []
system "#{clang}++", "--target=#{target}", "-v", "test.cc", "-o", "test-cxx-#{target}", *pthread_flags
assert_equal "hello from C++ main with cout!", shell_output("wasmtime #{testpath}/test-cxx-#{target}").chomp
end
end
Expand Down
Loading