diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-10-04 02:28:41 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-10-04 02:28:41 +0000 |
commit | 7e6d8cc46ccb8371baf3724c0925fb1c56bf0550 (patch) | |
tree | 0773cb1b913e1238835c491b8b28a329068b28a6 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | 83200fdc65a8ded67f09bef09e93f20b189f66b2 (diff) | |
download | llvm-7e6d8cc46ccb8371baf3724c0925fb1c56bf0550.zip llvm-7e6d8cc46ccb8371baf3724c0925fb1c56bf0550.tar.gz llvm-7e6d8cc46ccb8371baf3724c0925fb1c56bf0550.tar.bz2 |
Factor the data apart from the logic of locating various GCC
installations. This first selects a set of prefixes and a set of
compatible triples for the current architecture. Once selected, we drive
the search with a single piece of code.
This code isn't particularly efficient as it stands, but its only
executed once. I'm hoping as I clean up the users of this information,
it will also slowly become both cleaner and more efficient.
This also changes the behavior slightly. Previously, we had an ad-hoc
list of prefixes and triples, and we only looked for some triples
beneath specific prefixes and vice versa. This has led to lots of
one-off patches to support triple X, or support lib dir Y. Even without
going to a fully universal driver, we can do better here. This patch
makes us always look first in either 'lib32' or 'lib64' on 32- or 64-bit
hosts (resp.). However, we *always* look in 'lib'.
Currently I have one lingering problem with this strategy. We might find
a newer or better GCC version under a different (but equally compatible)
triple. Fundamentally, this loop needs to be fused with the one below.
That's my next patch.
llvm-svn: 141056
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions