jrtc27 added a comment. In D110663#3029124 <https://reviews.llvm.org/D110663#3029124>, @MaskRay wrote:
> In D110663#3029088 <https://reviews.llvm.org/D110663#3029088>, @phosek wrote: > >> The reason I removed this behavior in D101194 >> <https://reviews.llvm.org/D101194>, aside from extra overhead introduced by >> the extra checks, is that we've seen cases where people would have both >> paths on their system which lead to difficult to diagnose issues where Clang >> would pick up a library different from the one they expected. I'd therefore >> prefer supporting only a single spelling of the triple that could be >> configured, and making sure that Clang build on Debian uses the right >> configuration. > > The problem is that when LLVM_DEFAULT_TARGET_TRIPLE is "x86_64-linux-gnu" (no > vendor part), CMake respects it (instead of adding `unknown`) and installs > files to `lib/clang/14.0.0/x86_64-linux-gnu/`. > Currently clang driver only inspects the normalized > `lib/clang/14.0.0/x86_64-unknown-linux-gnu/` and cannot find it. > > I think D101194 <https://reviews.llvm.org/D101194> caused the workaround used > by @sylvestre.ledru: symlink `/usr/lib/llvm-14/lib/x86_64-linux-gnu` -> > `x86_64-pc-linux-gnu` > (I am quite confused by the pc part. That looks like a Debian configuration > issue.) > >> A potential solution would be to reintroduce the portion D101194 >> <https://reviews.llvm.org/D101194> which would let each driver control the >> triple spelling (by overriding getMultiarchTriple. On Linux, including >> Debian, that logic is already implemented in >> https://github.com/llvm/llvm-project/blob/7255ce30e48feb07e4e82613f518683fbc247c1c/clang/lib/Driver/ToolChains/Linux.cpp#L40, >> and on all other platforms this could simply return TargetTriple.str() as >> was done in D101194 <https://reviews.llvm.org/D101194>. > > On many Debian/Ubuntu derivatives, `Distro.IsDebian() || Distro.IsUbuntu()` > is false but they use the Debian multiarch hierarchy. How to make these > distributions work? > For non-Debian distros (e.g. Arch Linux), I'd still prefer we use the GCC > vanilla `x86_64-unknown-linux-gnu`. x86 is unusual; the default vendor, at least in the GNU world, is pc, not unknown (e.g. `config.guess x86_64-linux-gnu` prints x86_64-pc-linux-gnu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110663/new/ https://reviews.llvm.org/D110663 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits