Skip to content

Commit 1e18cf7

Browse files
add wasmoptflags to crossruby product
1 parent c3a4d1f commit 1e18cf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ruby_wasm/build_system/product/crossruby.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def define_task(crossruby)
6262

6363
class CrossRubyProduct < BuildProduct
6464
attr_reader :source, :toolchain, :build, :configure
65-
attr_accessor :user_exts
65+
attr_accessor :user_exts, :wasmoptflags
6666

6767
def initialize(
6868
params,
@@ -81,6 +81,7 @@ def initialize(
8181
@toolchain = toolchain
8282
@dep_tasks = []
8383
@user_exts = user_exts
84+
@wasmoptflags = nil
8485
end
8586

8687
def define_task
@@ -229,6 +230,7 @@ def configure_args(build_triple, toolchain)
229230
args << %Q(wasmoptflags="-O3 -g")
230231
else
231232
args << %Q(debugflags="-g0")
233+
args << %Q(wasmoptflags="#{wasmoptflags}") if @wasmoptflags
232234
end
233235
args << "--disable-install-doc"
234236
args

0 commit comments

Comments
 (0)