Skip to content

Commit

Permalink
wasi-runtimes: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab committed Dec 13, 2024
1 parent fb50b70 commit 3626ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Formula/w/wasi-runtimes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def install
system clang, "--target=#{target}", "-v", "test.c", "-o", "test-#{target}"
assert_equal "the answer is 42", shell_output("wasmtime #{testpath}/test-#{target}")

pthread_flags = target.end_with?("-threads") ? ["-D_WASI_EMULATED_PTHREAD"] : []
pthread_flags = target.end_with?("-threads") ? ["-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
Expand Down

0 comments on commit 3626ba1

Please sign in to comment.