[cfe-commits] Inferring host triple from command name

Joerg Sonnenberger joerg at britannica.bec.de
Mon Mar 14 18:29:17 PDT 2011


On Tue, Mar 15, 2011 at 12:19:06AM +0100, Joerg Sonnenberger wrote:
> the attached patch allows inferring the host triple from the command
> name, making it easier to integrate in a cross-compiling toolchain.
> To use this, simply create a symlink from clang e.g. to
> x86_64-netbsd-clang and the latter will default to the x86_64--netbsd
> target.

Of course, both the rsplit and the TargetRegistry::lookup don't work as
expected. Attached patch makes sure that a bare clang actually works.
This still has the problem that e.g. x86_64-netbsd-clang-cpp doesn't
work as expected (at least for me), since TargetRegistry::lookup happily
accepts "x86_64-netbsd-clang" as triple. One option would be to move to
a different separator (e.g. ::). Suggestions?

Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver-target.diff
Type: text/x-diff
Size: 2619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110315/86e49523/attachment.diff>


More information about the cfe-commits mailing list