Fix `_get_make_variables` ignoring user environment variables (#1230)

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
This commit is contained in:
Michael Allwright 2024-08-13 01:08:34 +02:00 committed by GitHub
parent 3ffc4bda69
commit d70efd6d8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 9 deletions

View File

@ -99,15 +99,14 @@ def _get_make_variables(workspace_name, tools, flags, user_env_vars, make_comman
vars = {} vars = {}
for flag in _MAKE_FLAGS: for flag in _MAKE_FLAGS:
flag_value = getattr(flags, _MAKE_FLAGS[flag]) toolchain_flags = getattr(flags, _MAKE_FLAGS[flag], [])
if flag_value: user_flags = [
vars[flag] = flag_value user_flag
for user_flag in user_env_vars.get(flag, "").split(" ")
# Merge flags lists if user_flag
for user_var in user_env_vars: ]
toolchain_val = vars.get(user_var) if toolchain_flags or user_flags:
if toolchain_val: vars[flag] = toolchain_flags + user_flags
vars[user_var] = toolchain_val + [user_env_vars[user_var]]
tools_dict = {} tools_dict = {}
for tool in _MAKE_TOOLS: for tool in _MAKE_TOOLS: