[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

John Paul Adrian Glaubitz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 4 05:36:03 PST 2021


glaubitz added a comment.

In D52050#2468424 <https://reviews.llvm.org/D52050#2468424>, @jrtc27 wrote:

>> However, that's not the same as whether we're on an x86_64 system or on an x32 system determines which GNU triplet to use and which include and library search paths are our primary ones.
>
> But `Triple.getEnvironment()` will give you `llvm::Triple::GNUX32` that you can check?

Yes, but we have to differentiate four scenarios:

- On x86_64, targeting x86_64
- On x86_64, targeting x32
- On x32, targeting x32
- On x32, targeting x86_64

On x86 it's clear because "x86" is an architecture on its own from clang's point of view. But that doesn't apply for x32 (at least for clang) and hence I don't know how to differentiate these four scenarios.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52050/new/

https://reviews.llvm.org/D52050



More information about the cfe-commits mailing list