scons: Use Dir().Dir() and not os.path to extend CPPPATH.

Since we're already working with Dir nodes, they can figure out
appending to a path themselves without using os.path.join.

Change-Id: Ib46946d7ec181dbbf443f957f23196eb0fd7f6b5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48127
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-07-09 23:39:44 -07:00
parent 1c7f63c84a
commit 1a8a3864cd

View File

@@ -694,8 +694,7 @@ for extra_dir in extras_dir_list:
# Also add the corresponding build directory to pick up generated
# include files.
env.Append(CPPPATH=Dir(os.path.join(env['BUILDDIR'],
extra_dir[prefix_len:])))
env.Append(CPPPATH=Dir(env['BUILDDIR']).Dir(extra_dir[prefix_len:]))
for root, dirs, files in os.walk(extra_dir, topdown=True):
# if build lives in the extras directory, don't walk down it