Skip to content

Commit

Permalink
hack: add unstable-options
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker committed Jan 16, 2024
1 parent 790f710 commit 68ba18a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/backend/ninjabackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ def _link_library(libname: str, static: bool, bundle: bool = False):
for rpath_arg in rpath_args:
args += ['-C', 'link-arg=' + rpath_arg + ':' + os.path.join(rustc.get_sysroot(), 'lib')]

compiler_name = self.compiler_to_rule_name(rustc)
compiler_name: str = self.compiler_to_rule_name(rustc)
if rustc.needs_env_wrapper:
compiler_name = self.get_compiler_rule_name(rustc.get_language(), rustc.for_machine, 'ENV')

Expand Down Expand Up @@ -2099,6 +2099,9 @@ def _link_library(libname: str, static: bool, bundle: bool = False):
env.extend(['--env', a])
element.add_item('ENV', env)
args = nargs
else:
# XXX: this needs a heiristc
args.extend(['-Z', 'unstable-options'])
element.add_item('ARGS', args)
element.add_item('targetdep', depfile)
element.add_item('cratetype', cratetype)
Expand Down

0 comments on commit 68ba18a

Please sign in to comment.