Skip to content

Commit 70068a6

Browse files
Use ruby -C instead of chdir in Kernel#system (#385)
* Use `ruby -C` instead of `chdir` in Kernel#system To allow developers to use console-printed commands without cd'ing into the build directory. * `$have_devel` check is now passing without any hack
1 parent baef2af commit 70068a6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/ruby_wasm/build/product/crossruby.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,14 @@ def do_extconf(executor, crossruby)
6464
objdir = product_build_dir crossruby
6565
source = crossruby.source
6666
extconf_args = [
67+
"-C", objdir,
6768
"--disable=gems",
6869
# HACK: top_srcdir is required to find ruby headers
6970
"-e",
7071
%Q($top_srcdir="#{source.src_dir}"),
7172
# HACK: extout is required to find config.h
7273
"-e",
7374
%Q($extout="#{crossruby.build_dir}/.ext"),
74-
# HACK: skip have_devel check since ruby is not installed yet
75-
"-e",
76-
"$have_devel = true",
7775
# HACK: force static ext build by imitating extmk
7876
"-e",
7977
"$static = true; trace_var(:$static) {|v| $static = true }",
@@ -93,7 +91,6 @@ def do_extconf(executor, crossruby)
9391
# Clear RUBYOPT to avoid loading unrelated bundle setup
9492
executor.system crossruby.baseruby_path,
9593
*extconf_args,
96-
chdir: objdir,
9794
env: {
9895
"RUBYOPT" => ""
9996
}

0 commit comments

Comments
 (0)