Skip to content

Commit b4193a7

Browse files
Merge pull request #374 from mame/allow-emscripten-build-with-xterm-pty
2 parents c781b6c + 7468a54 commit b4193a7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/ruby_wasm/build/product/crossruby.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ def configure_args(build_triple, toolchain)
298298
args << %Q(WASI_SDK_PATH=#{wasi_sdk_path.wasi_sdk_path})
299299
when "wasm32-unknown-emscripten"
300300
ldflags.concat(%w[-s MODULARIZE=1])
301+
env_emcc_ldflags = ENV["RUBY_WASM_EMCC_LDFLAGS"] || ""
302+
unless env_emcc_ldflags.empty?
303+
ldflags << env_emcc_ldflags
304+
end
301305
else
302306
raise "unknown target: #{target}"
303307
end

lib/ruby_wasm/cli.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ def build_config(options)
156156
case options[:profile]
157157
when "full"
158158
config[:default_exts] = RubyWasm::Packager::ALL_DEFAULT_EXTS
159+
env_additional_exts = ENV["RUBY_WASM_ADDITIONAL_EXTS"] || ""
160+
unless env_additional_exts.empty?
161+
config[:default_exts] += "," + env_additional_exts
162+
end
159163
when "minimal"
160164
config[:default_exts] = ""
161165
else

0 commit comments

Comments
 (0)