[PATCH] D109727: [Driver] Remove unneeded *-suse-* triples

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 13 15:35:57 PDT 2021


MaskRay created this revision.
MaskRay added reviewers: asb, schwab, tstellar.
Herald added subscribers: StephenFan, dexonsmith, luismarques, steven.zhang, s.egerton, PkmX, simoncook, hiraditya, kristof.beyls.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

`CollectLibDirsAndTriples` has a number of `*Triples` elements (hack) so that
`--target=aarch64-linux-gnu` can auto detect `lib/aarch64-suse-linux`. IMO
trouble from the magic behavior outweighs its convenience.

For most users (who don't specify `--target`), the CMake
`LLVM_DEFAULT_TARGET_TRIPLE` variable should just point to the correct triple
(e.g. `aarch64-suse-linux`), and Clang driver will find the right
`lib/aarch64-suse-linux` directory without a hard coded element in `AArch64LibDirs`.

For people who specify `--target` for cross compilation, they should specify the
full target triple instead of relying on `--target=riscv64` expanding to
`--target=riscv64-suse-linux`.

Also revert rL304670 <https://reviews.llvm.org/rL304670> (normalize gnueabi to gnueabihf)

Note: the test added by D63497 <https://reviews.llvm.org/D63497> works even without `riscv64-suse-linux`
in `RISCV64Triples`

I have kept powerpc64-suse-linux in `PPCTriples` because it somehow uses the
multilib behavior for native Clang. That doesn't look right to me.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109727

Files:
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/linux-header-search.cpp
  clang/test/Driver/linux-ld.c
  llvm/lib/Support/Triple.cpp
  llvm/unittests/ADT/TripleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109727.372355.patch
Type: text/x-patch
Size: 9207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210913/850818e9/attachment.bin>


More information about the cfe-commits mailing list