[PATCH] D157275: [Driver] Select newest GCC installation on Solaris
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 14 08:15:40 PDT 2023
MaskRay added a comment.
Thanks for the update. Regarding testing, it seems that unittests will be more convenience than creating so many placeholder files in `Inputs/`. `clang/unittests/Driver/ToolChainTest.cpp` `TEST(ToolChainTest, VFSGCCInstallation)` has an example for Linux. You can add another for Solaris.
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2258
- Prefixes.push_back(CandidatePrefix);
+ SolarisPrefixes.push_back(CandidatePrefix);
}
----------------
It's better to use https://en.wikipedia.org/wiki/Schwartzian_transform here to avoid calling `llvm::sys::path::filename` and `Generic_GCC::GCCVersion::Parse` in the comparator. Then the comparator is just `A < B` and can just be removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157275/new/
https://reviews.llvm.org/D157275
More information about the cfe-commits
mailing list