Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/17128
Change subject: scons: Don't use isdir in AddLocalRPATH.
......................................................................
scons: Don't use isdir in AddLocalRPATH.
isdir isn't a nice way to check if an FS.Base is a File or a Dir as was
initially assumed, it literally checks if a path can be stat-ed and is
reported as a directory by stat. This means that if a directory is
going to be created as part of the build, the result of that test will
change depending on whether that part of the build has happened
successfully before.
A better check which behaves as originally intended is to check whether
the Node is an instance of the SCons.Node.FS.Dir class.
Change-Id: Id041917d50b768a8205769c0a05320f92b09993c
---
M SConstruct
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SConstruct b/SConstruct
index 3599371..53b8c9d 100755
--- a/SConstruct
+++ b/SConstruct
@@ -97,6 +97,7 @@
# SCons includes
import SCons
import SCons.Node
+import SCons.Node.FS
from m5.util import compareVersions, readCommand
@@ -1096,7 +1097,7 @@
binary.'''
for target in targets:
target = env.Entry(target)
- if not target.isdir():
+ if not isinstance(target, SCons.Node.FS.Dir):
target = target.dir
relpath = os.path.relpath(target.abspath, env['BUILDDIR'])
components = [
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17128
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Id041917d50b768a8205769c0a05320f92b09993c
Gerrit-Change-Number: 17128
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev