SCons: Stop embedding the mercurial revision into the binary.
This causes a lot of rebuilds that could have otherwise possibly been avoided, and, more annoyingly, a lot of unnecessary rerunning of the regressions. The benefits of having the revision in the output haven't materialized, so this change removes it.
This commit is contained in:
parent
b6ba1a528b
commit
02f10fbdc8
3 changed files with 3 additions and 16 deletions
12
SConstruct
12
SConstruct
|
@ -227,16 +227,8 @@ If you are actually a M5 developer, please fix this and
|
||||||
run the style hook. It is important.
|
run the style hook. It is important.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
hg_info = "Unknown"
|
|
||||||
if hgdir.exists():
|
if hgdir.exists():
|
||||||
# 1) Grab repository revision if we know it.
|
# Ensure that the style hook is in place.
|
||||||
cmd = "hg id -n -i -t -b"
|
|
||||||
try:
|
|
||||||
hg_info = readCommand(cmd, cwd=main.root.abspath).strip()
|
|
||||||
except OSError:
|
|
||||||
print mercurial_bin_not_found
|
|
||||||
|
|
||||||
# 2) Ensure that the style hook is in place.
|
|
||||||
try:
|
try:
|
||||||
ui = None
|
ui = None
|
||||||
if not GetOption('ignore_style'):
|
if not GetOption('ignore_style'):
|
||||||
|
@ -255,8 +247,6 @@ if hgdir.exists():
|
||||||
else:
|
else:
|
||||||
print ".hg directory not found"
|
print ".hg directory not found"
|
||||||
|
|
||||||
main['HG_INFO'] = hg_info
|
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
#
|
#
|
||||||
# Figure out which configurations to set up based on the path(s) of
|
# Figure out which configurations to set up based on the path(s) of
|
||||||
|
|
|
@ -410,7 +410,7 @@ depends = [ PySource.modules[dep].snode for dep in module_depends ]
|
||||||
# Generate Python file containing a dict specifying the current
|
# Generate Python file containing a dict specifying the current
|
||||||
# buildEnv flags.
|
# buildEnv flags.
|
||||||
def makeDefinesPyFile(target, source, env):
|
def makeDefinesPyFile(target, source, env):
|
||||||
build_env, hg_info = [ x.get_contents() for x in source ]
|
build_env = source[0].get_contents()
|
||||||
|
|
||||||
code = code_formatter()
|
code = code_formatter()
|
||||||
code("""
|
code("""
|
||||||
|
@ -418,7 +418,6 @@ import m5.internal
|
||||||
import m5.util
|
import m5.util
|
||||||
|
|
||||||
buildEnv = m5.util.SmartDict($build_env)
|
buildEnv = m5.util.SmartDict($build_env)
|
||||||
hgRev = '$hg_info'
|
|
||||||
|
|
||||||
compileDate = m5.internal.core.compileDate
|
compileDate = m5.internal.core.compileDate
|
||||||
_globals = globals()
|
_globals = globals()
|
||||||
|
@ -430,7 +429,7 @@ del _globals
|
||||||
""")
|
""")
|
||||||
code.write(target[0].abspath)
|
code.write(target[0].abspath)
|
||||||
|
|
||||||
defines_info = [ Value(build_env), Value(env['HG_INFO']) ]
|
defines_info = Value(build_env)
|
||||||
# Generate a file with all of the compile options in it
|
# Generate a file with all of the compile options in it
|
||||||
env.Command('python/m5/defines.py', defines_info,
|
env.Command('python/m5/defines.py', defines_info,
|
||||||
MakeAction(makeDefinesPyFile, Transform("DEFINES", 0)))
|
MakeAction(makeDefinesPyFile, Transform("DEFINES", 0)))
|
||||||
|
|
|
@ -177,7 +177,6 @@ def main():
|
||||||
print 'Build information:'
|
print 'Build information:'
|
||||||
print
|
print
|
||||||
print 'compiled %s' % defines.compileDate;
|
print 'compiled %s' % defines.compileDate;
|
||||||
print "revision %s" % defines.hgRev
|
|
||||||
print 'build options:'
|
print 'build options:'
|
||||||
keys = defines.buildEnv.keys()
|
keys = defines.buildEnv.keys()
|
||||||
keys.sort()
|
keys.sort()
|
||||||
|
@ -245,7 +244,6 @@ def main():
|
||||||
print
|
print
|
||||||
|
|
||||||
print "M5 compiled %s" % defines.compileDate;
|
print "M5 compiled %s" % defines.compileDate;
|
||||||
print "M5 revision %s" % defines.hgRev
|
|
||||||
|
|
||||||
print "M5 started %s" % datetime.datetime.now().strftime("%b %e %Y %X")
|
print "M5 started %s" % datetime.datetime.now().strftime("%b %e %Y %X")
|
||||||
print "M5 executing on %s" % socket.gethostname()
|
print "M5 executing on %s" % socket.gethostname()
|
||||||
|
|
Loading…
Reference in a new issue