config: Rework the SysPaths functions into functors.
authorGabe Black <gabeblack@google.com>
Tue, 31 Oct 2017 01:31:07 +0000 (18:31 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 31 Oct 2017 22:18:26 +0000 (22:18 +0000)
commit97c68e8fc56baa39ce7901ac1f73d2ff79b550f2
tree8b60d9815d1b460c9c4a4439d1e38d83f5b95e20
parentfd16487b71e7b4e0c2df71d77bd2da947fdee2e9
config: Rework the SysPaths functions into functors.

These functions were already being treated as psuedo objects and had
properties assigned to them setting what their paths were. That's a bit
unusual and made it less obvious what the code was doing, but also
forced the "system" function to know what all the possible path
searching functions were so that they'd have their "path" property
initialized properly in a central location.

This change introduces a PathSearcFunc class which encapsulates the
mechanisms of the old code and makes it implicitly extensible so that
other path searching functions which might look in other directories
can be added in other places.

Change-Id: I7be28e51481a06ec83997677af99927709b18003
Reviewed-on: https://gem5-review.googlesource.com/5341
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
configs/common/SysPaths.py