python: Fix m5.defines so grabbing flags works correctly

This commit is contained in:
Nathan Binkert 2009-09-26 12:51:37 -07:00
parent 7a8ee4f40a
commit 160bcf4442

View file

@ -411,9 +411,12 @@ buildEnv = m5.util.SmartDict($build_env)
hgRev = '$hg_info' hgRev = '$hg_info'
compileDate = m5.internal.core.compileDate compileDate = m5.internal.core.compileDate
for k,v in m5.internal.core.__dict__.iteritems(): _globals = globals()
if k.startswith('flag_'): for key,val in m5.internal.core.__dict__.iteritems():
setattr(buildEnv, k[5:], v) if key.startswith('flag_'):
flag = key[5:]
_globals[flag] = val
del _globals
""") """)
code.write(str(target[0])) code.write(str(target[0]))