[all-commits] [llvm/llvm-project] fe5912: [clang][Driver] Fix tool path priority test failures
David Spickett via All-commits
all-commits at lists.llvm.org
Wed Jul 15 01:37:29 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fe5912249efa1ec5e6aa6e565f722dd4d33d1e54
https://github.com/llvm/llvm-project/commit/fe5912249efa1ec5e6aa6e565f722dd4d33d1e54
Author: David Spickett <david.spickett at linaro.org>
Date: 2020-07-15 (Wed, 15 Jul 2020)
Changed paths:
M clang/test/Driver/program-path-priority.c
M clang/test/lit.cfg.py
Log Message:
-----------
[clang][Driver] Fix tool path priority test failures
Summary:
Failure type 1:
This test can fail when the path of the build includes the strings
we're checking for. E.g "/gcc" is found in ".../gcc_7.3.0/..."
To correct this look for '"' on the end of all matches. So that we
only match the end of paths printed by clang -###.
(which would be ".../gcc_7.3.0/.../gcc" for the example)
Also look for other gcc names like gcc-x.y.z in the first check.
This confirms that the copy of clang we made is isolated as expected.
Failure type 2:
If you use a triple like "powerpc64le-linux-gnu" clang actually reports
"powerpc64le-unknown-linux-gnu". Then it searches for the
former.
That combined with Mac OS adding a version number to cmake's triple
means we can't trust cmake or clang to give us the one default triple.
To fix the test, write to both names. As they don't overlap with our
fake triple, we're still showing that the lookup works.
Reviewers: MaskRay, stevewan
Reviewed By: stevewan
Subscribers: miyuki, JDevlieghere, steven.zhang, stevewan, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83055
More information about the All-commits
mailing list