diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-03-13 17:47:33 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-03-13 17:47:33 -0700 |
commit | b8c1e370faca4513c102e17e57f2e00791189644 (patch) | |
tree | a835c5d88267490912b3b6d6160692ba68bbacb4 /src/SConscript | |
parent | 807e2705b4abeefaabdc1cb3e0dfdc1acdccdc30 (diff) | |
download | gem5-b8c1e370faca4513c102e17e57f2e00791189644.tar.xz |
scons: fix building in non-standard locations
It's apparently not widely known that our scons scripts allow you to
put the build directory wherever you want; not only does it not have
to be immediately under the root of your repo, it doesn't even have
to be underneath the root at all. (For example, sometimes it's useful
to build on a local disk if your repo is on a slow NFS mount.)
I point this out because this functionality has been broken for close
to two years but no one seems to have noticed yet. This patch fixes
an assumption that crept in in changeset be0e1724eb39 (May 09 2014)
that the build dir would be immediately under the top level of the
repo, preventing builds anywhere else.
Diffstat (limited to 'src/SConscript')
-rwxr-xr-x | src/SConscript | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/SConscript b/src/SConscript index 9b6c2170b..d0835bda3 100755 --- a/src/SConscript +++ b/src/SConscript @@ -1251,7 +1251,6 @@ needed_envs = [identifyTarget(target) for target in BUILD_TARGETS] if 'all' in needed_envs: needed_envs += target_types -gem5_root = Dir('.').up().up().abspath def makeEnvirons(target, source, env): # cause any later Source() calls to be fatal, as a diagnostic. Source.done() @@ -1300,7 +1299,7 @@ def makeEnvirons(target, source, env): # Set up the regression tests for each build. for e in envList: - SConscript(os.path.join(gem5_root, 'tests', 'SConscript'), + SConscript(os.path.join(env.root.abspath, 'tests', 'SConscript'), variant_dir = variantd('tests', e.Label), exports = { 'env' : e }, duplicate = False) |