Skip to content

Commit 0db683f

Browse files
committed
Always keep --native when passed to JT
* Ensures the resulting process actually runs in native and not JVM mode.
1 parent 3a5e348 commit 0db683f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tool/jt.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ def run_ruby(*args)
710710
case arg
711711
when '--native'
712712
native = true
713+
vm_args << '--native'
713714
when '--no-core-load-path'
714715
core_load_path = false
715716
when '--graal'
@@ -1311,6 +1312,7 @@ def test_specs(command, *args)
13111312
if args.delete('--native')
13121313
verify_native_bin!
13131314
options << '-t' << find_launcher(true)
1315+
options << '-T--native'
13141316
else
13151317
options += %w[-T--vm.ea -T--vm.esa -T--vm.Xmx2G]
13161318
options << "-T--core.load_path=#{TRUFFLERUBY_DIR}/src/main/ruby"
@@ -1747,7 +1749,7 @@ def benchmark(*args)
17471749

17481750
run_args = []
17491751

1750-
if args.delete('--native') || (ENV.has_key?('JT_BENCHMARK_RUBY') && (ENV['JT_BENCHMARK_RUBY'] == find_launcher(true)))
1752+
if args.include?('--native') || (ENV.has_key?('JT_BENCHMARK_RUBY') && (ENV['JT_BENCHMARK_RUBY'] == find_launcher(true)))
17511753
# We already have a mechanism for setting the Ruby to benchmark, but elsewhere we use AOT_BIN with the "--native" flag.
17521754
# Favor JT_BENCHMARK_RUBY to AOT_BIN, but try both.
17531755
benchmark_ruby ||= find_launcher(true)

0 commit comments

Comments
 (0)