[PATCH] D110142: [clang][Driver] Correct runtime path for Arm hard float targets

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 22 09:33:48 PDT 2021


MaskRay added a comment.

In D110142#3015482 <https://reviews.llvm.org/D110142#3015482>, @DavidSpickett wrote:

> So would you expect to see libraries in `lib/clang/14.0.0/lib/armv8l-unknown-linux-gnueabihf` and not change clang's logic?

I'd hope that it works this way (`armv8l-*`) :)

> The output dir is worked out in cmake by `get_compiler_rt_output_dir` which calls `get_compiler_rt_target` which takes the arch given and adds it to the suffix of the triple. So it adds "armhf" to "-unknown-linux-gnueabihf". (which is why the "hf" is duplicated)
>
> A few places look for "armhf" specifically as the arch, so it's not as easy as just not converting "armv8l" into that. But if we can confirm what the goal is here then I can find out how to properly handle those.

I took a glance at `get_compiler_rt_target`... It is complex. If you can figure it out, that will be great!

> You can just bodge `get_compiler_rt_target` to just use the target triple but of course that breaks any build for multiple targets. If I'm reading `test_targets` correctly, it builds a list of architectures to build as opposed to finding the first working one.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110142



More information about the cfe-commits mailing list