[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 16 01:32:10 PST 2022


MaskRay added a comment.

In D110663#3324970 <https://reviews.llvm.org/D110663#3324970>, @phosek wrote:

> In D110663#3271084 <https://reviews.llvm.org/D110663#3271084>, @MaskRay wrote:
>
>> No worries! Thanks for the reply.
>>
>> I use Debian and want it to work well and support the `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on` direction.
>> Currently, `-DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-gnu` (Debian style multiarch triple, so no `-unknown` or `-pc`) does not work for libc++ and some runtime libraries.
>
> I believe this can be also addressed by changes to the CMake build without needing to change the driver. I have a series of patches and I'll try to send them for review in the next few days (I think those patches are desirable independently of which solution we ultimately choose).

It could be addressed by letting CMake normalize LLVM_DEFAULT_TARGET_TRIPLE before constructing the multiarch search path, but I think that's the wrong direction.
The only way allowing removal of various normalization code in CMake/ClangDriver is to do no normalization. Just respect user-specified target triples (from `LLVM_DEFAULT_TARGET_TRIPLE`, or from `--target=`) as is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110663



More information about the cfe-commits mailing list