Skip to content

Commit

Permalink
Do not set -H:Path for Ruby, let its native-image.properties define it
Browse files Browse the repository at this point in the history
* So the Ruby launcher will be in languages/ruby/bin/truffleruby,
  next to other launchers.
  • Loading branch information
eregon committed Apr 3, 2018
1 parent 02f2f79 commit 3819984
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions substratevm/mx.substratevm/mx_substratevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def __getattr__(self, name):
@contextmanager
def native_image_context(common_args=None, hosted_assertions=True):
common_args = [] if common_args is None else common_args
base_args = ['-H:Path=' + svmbuild_dir()]
base_args = []
if mx.get_opts().verbose:
base_args += ['--verbose']
if mx.get_opts().very_verbose:
Expand All @@ -532,8 +532,10 @@ def query_native_image(all_args, option):
if sep:
return after.split(' ')[0].rstrip()
return None
def native_image_func(args):
def native_image_func(args, setPath=True):
all_args = base_args + common_args + args
if setPath:
all_args = ['-H:Path=' + svmbuild_dir()] + all_args
path = query_native_image(all_args, '-H:Path=')
name = query_native_image(all_args, '-H:Name=')
image = join(path, name)
Expand Down Expand Up @@ -690,7 +692,7 @@ def test_python_smoke(args):
def build_ruby(native_image):
truffle_language_ensure('llvm') # ruby depends on sulong
truffle_language_ensure('ruby')
return native_image(['--Language:ruby'])
return native_image(['--Language:ruby'], setPath=False)

def test_ruby(args):
if len(args) < 1 or len(args) > 2:
Expand Down

0 comments on commit 3819984

Please sign in to comment.