scons: Fix scons ParseConfig error for SCons versions 4.4+

SCons 4.4 changed the ParseConfig user's function signature [1].
The function is now required to take `unique` as a parameter.

[1] d0106a9967

Change-Id: I3fa9fbf77ff3877187e15c63f5414889a53caefa
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62091
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Hoa Nguyen
2022-08-04 01:03:33 -07:00
parent 244f80dde1
commit 6ca1138a31

View File

@@ -319,7 +319,10 @@ def config_embedded_python(env):
if conf.TryAction(f'@{python_config} --embed')[0]:
cmd.append('--embed')
def flag_filter(env, cmd_output):
def flag_filter(env, cmd_output, unique=True):
# Since this function does not use the `unique` param, one should not
# pass any value to this param.
assert(unique==True)
flags = cmd_output.split()
prefixes = ('-l', '-L', '-I')
is_useful = lambda x: any(x.startswith(prefix) for prefix in prefixes)