[lldb-dev] Host::GetArchitecture / default target triple question

Ed Maste emaste at freebsd.org
Tue Aug 19 13:38:23 PDT 2014

On 19 August 2014 15:35, Zachary Turner <zturner at google.com> wrote:
> In Host::GetArchitecture() we see this line:
>         // If the OS is Linux, "unknown" in the vendor slot isn't what we
> want
>         // for the default triple.  It's probably an artifact of
> config.guess.
>         if (triple.getOS() == llvm::Triple::Linux && triple.getVendor() ==
> llvm::Triple::UnknownVendor)
>             triple.setVendorName ("");
> Can anyone think of a reason why this check should be specific to Linux?

Hi Zach,

I dug up the source of this code - the original thread is here:

On FreeBSD we usually have "unknown" in the vendor field - e.g. the
default triple for lldb or clang on my desktop is
"x86_64-unknown-freebsd10.0".  Triples are quite a mess, it seems.  As
far as I can tell "pc" and "unknown" are basically equivalent, with
the former used in the case of x86 Linux, Windows, and a few others,
and the latter used for BSDs and non-x86.

That code block is really just a workaround for autoconf builds
choosing the wrong triple on Linux, so I don't think we want to make
this apply elsewhere.


More information about the lldb-dev mailing list