diff options
author | Benedikt Hegner <hegner@cern.ch> | 2016-04-27 01:23:53 +0200 |
---|---|---|
committer | Benedikt Hegner <hegner@cern.ch> | 2016-04-27 01:23:53 +0200 |
commit | b7c064142e6e4beb960aa979815471c3889ec925 (patch) | |
tree | d85b49b3aa5e8540dff2a4c1bbf10bf430c5497a /lib | |
parent | 92afa52eecb379d99ed14a4e805355e6fc7760db (diff) | |
download | spack-b7c064142e6e4beb960aa979815471c3889ec925.tar.gz spack-b7c064142e6e4beb960aa979815471c3889ec925.tar.bz2 spack-b7c064142e6e4beb960aa979815471c3889ec925.tar.xz spack-b7c064142e6e4beb960aa979815471c3889ec925.zip |
preserve lookup order in PATH when invoking 'spack compiler add'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/compiler.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index d38c0b00b1..2f89ec6144 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -202,6 +202,10 @@ class Compiler(object): return None successful = [key for key in parmap(check, checks) if key is not None] + # The 'successful' list is ordered like the input paths. + # Reverse it here so that the dict creation (last insert wins) + # does not spoil the intented precedence. + successful.reverse() return dict(((v, p, s), path) for v, p, s, path in successful) @classmethod |