Skip to content

Commit

Permalink
[Truffle] JT: Fix calling #run internally with options.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 13, 2016
1 parent ca6e1c3 commit 28aebbb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tool/jt.rb
Expand Up @@ -587,6 +587,7 @@ def rebuild

def run(*args)
env_vars = args.first.is_a?(Hash) ? args.shift : {}
options = args.last.is_a?(Hash) ? args.pop : {}

jruby_args = ['-X+T']

Expand Down Expand Up @@ -670,8 +671,6 @@ def run(*args)
jruby_args << "-J-Dgraal.TraceTruffleCompilation=true"
end

args << options = {}

if args.delete('--no-print-cmd')
options[:no_print_cmd] = true
end
Expand All @@ -680,7 +679,7 @@ def run(*args)
options[:use_exec] = true
end

raw_sh env_vars, Utilities.find_jruby, *jruby_args, *args
raw_sh env_vars, Utilities.find_jruby, *jruby_args, *args, options
end

# Same as #run but uses exec()
Expand Down

0 comments on commit 28aebbb

Please sign in to comment.