Skip to content

Use ruby -C instead of chdir in Kernel#system #385

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

Merged
merged 2 commits into from
Feb 5, 2024
Merged
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
5 changes: 1 addition & 4 deletions lib/ruby_wasm/build/product/crossruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ def do_extconf(executor, crossruby)
objdir = product_build_dir crossruby
source = crossruby.source
extconf_args = [
"-C", objdir,
"--disable=gems",
# HACK: top_srcdir is required to find ruby headers
"-e",
%Q($top_srcdir="#{source.src_dir}"),
# HACK: extout is required to find config.h
"-e",
%Q($extout="#{crossruby.build_dir}/.ext"),
# HACK: skip have_devel check since ruby is not installed yet
"-e",
"$have_devel = true",
# HACK: force static ext build by imitating extmk
"-e",
"$static = true; trace_var(:$static) {|v| $static = true }",
Expand All @@ -93,7 +91,6 @@ def do_extconf(executor, crossruby)
# Clear RUBYOPT to avoid loading unrelated bundle setup
executor.system crossruby.baseruby_path,
*extconf_args,
chdir: objdir,
env: {
"RUBYOPT" => ""
}
Expand Down