From 145353a00648b478462056b3fddcda52d5c03119 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 16 Jan 2024 15:57:04 -0800 Subject: [PATCH] hack: add unstable-options --- mesonbuild/backend/ninjabackend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 702020d3856b..00bc65c3ddaf 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -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') @@ -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)