summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2021-12-29 06:33:03 +0000
committerYusuke Endoh <mame@ruby-lang.org>2022-01-06 18:14:24 +0900
commite554b17c60b31c79c91cc6fd480c692b04ca9e3f (patch)
tree383b16eb07a49fabacfa1bee5601b2bbb0a330c0 /tool/rbinstall.rb
parent2db7952e592789819d18b28b1b9ef1b36671f21d (diff)
downloadruby-e554b17c60b31c79c91cc6fd480c692b04ca9e3f.tar.gz
tool/rbinstall.rb: instal ruby.wasm produced by Emscripten
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 0b1195e360..9d9b672be4 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -376,6 +376,11 @@ install?(:local, :arch, :bin, :'bin-arch') do
if rubyw_install_name and !rubyw_install_name.empty?
install rubyw_install_name+exeext, bindir, :mode => $prog_mode, :strip => $strip
end
+ # emcc produces ruby and ruby.wasm, the first is a JavaScript file of runtime support
+ # to load and execute the second .wasm file. Both are required to execute ruby
+ if RUBY_PLATFORM =~ /emscripten/ and File.exist? ruby_install_name+".wasm"
+ install ruby_install_name+".wasm", bindir, :mode => $prog_mode, :strip => $strip
+ end
if File.exist? goruby_install_name+exeext
install goruby_install_name+exeext, bindir, :mode => $prog_mode, :strip => $strip
end