[PATCH 1/6] build: Fix script action
Chris Johns
chrisj at rtems.org
Wed Feb 28 05:35:36 UTC 2024
On 28/2/2024 2:15 am, Sebastian Huber wrote:
> We have to use a custom dictorary to be able to set the "value" argument
Spelling. :)
Chris
> in the exec() context.
>
> Update #4272.
> ---
> wscript | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/wscript b/wscript
> index a71e0d3f10..6c81083b2c 100755
> --- a/wscript
> +++ b/wscript
> @@ -1026,8 +1026,14 @@ class OptionItem(Item):
> return value
>
> def _script(self, conf, cic, value, arg):
> - exec(arg)
> - return value
> + local_variables = {
> + "self": self,
> + "conf": conf,
> + "cic": cic,
> + "value": value
> + }
> + exec(arg, None, local_variables)
> + return local_variables["value"]
>
> def _test_state_benchmark(self, conf, name):
> self._do_append_test_cppflags(conf, name, "-DTEST_STATE_BENCHMARK=1")
More information about the devel
mailing list