[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-10-03 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. @MaskRay and @nickdesaulniers Can you please work together to reach a consensus on what is the best path forward? I am ok either way, just need to know what the next steps are. :) Thank you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://revie

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-30 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3826179 , @MaskRay wrote: > In D134454#3826143 , @10ne1 wrote: > >> In D134454#3824571 , @MaskRay >> wrote: >> >>> I'll grab an Arch Lin

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-29 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3824571 , @MaskRay wrote: > I'll grab an Arch Linux machine for testing, but I don't think this is > currently in a form for submitting. > This adds new functionality for non-MIPS and we need some fake file > hierarchie

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-29 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3824391 , @nickdesaulniers wrote: > Looks great! Nice job @10ne1 . Need me to commit this for you? Yes please, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D13

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-29 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 463864. 10ne1 marked an inline comment as done. 10ne1 added a comment. Updated based on feedback from Nick. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D134454 Files: clang/lib/Driver/ToolChains/Linux.cpp In

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-29 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 marked 7 inline comments as done. 10ne1 added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:363 const StringRef TripleStr = GCCInstallation.getTriple().str(); - const Multilib &Multilib = GCCInstallation.getMultilib(); + std::string Path = (Install

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-28 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 463465. 10ne1 marked an inline comment as done. 10ne1 edited the summary of this revision. Herald added subscribers: atanasyan, arichardson, sdardis. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D134454 Files: cl

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-28 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 marked 5 inline comments as done. 10ne1 added a comment. FYI: @MaskRay I think you will be very happy that after the simplifications Nick suggested the Distro::* additions are not necessary anymore. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:377-389 const Strin

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-27 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 463189. 10ne1 added a comment. Fixed some clang-format problems. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D134454 Files: clang/include/clang/Driver/Distro.h clang/lib/Driver/ToolChains/Linux.cpp Index:

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-27 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 marked 2 inline comments as done. 10ne1 added a comment. @nickdesaulniers @MaskRay I've updated the diff & summary based on the review comments which I've marked as done. Please tell me what you think. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://r

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-09-27 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 463177. 10ne1 retitled this revision from "[Driver][Distro] Fix ArchLinux triplet and sysroot detection" to "[Driver][Distro] Fix ArchLinux sysroot detection". 10ne1 edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1344

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-27 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3816460 , @MaskRay wrote: > I am nervous as well as Arch Linux has many derivatives. They likely don't > use `ID=arch` in `/etc/os-release`. The patch won't work for them. > In general, I don't think our current approach

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-27 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added inline comments. Comment at: clang/lib/Driver/Distro.cpp:213 + // that the Linux OS and distro are properly detected in this cases. + llvm::Triple NormTargetOrHost = llvm::Triple(Twine(TargetOrHost.normalize())); + nickdesaulniers wrote: > 10ne1 wr

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-26 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:377-394 + if (Distro.IsArchLinux()) { +std::string Path = (InstallDir + "/../../../../" + TripleStr).str(); +if (getVFS().exists(Path)) + return Path; + } + if (!GCCInstallation.isVa

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-26 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added inline comments. Comment at: clang/lib/Driver/Distro.cpp:213 + // that the Linux OS and distro are properly detected in this cases. + llvm::Triple NormTargetOrHost = llvm::Triple(Twine(TargetOrHost.normalize())); + nickdesaulniers wrote: > Twine ha

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-26 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 added a comment. In D134454#3812153 , @nickdesaulniers wrote: > Is it worth contacting the package maintainer for LLVM+clang for Arch-Linux > in regards to this patch? Yes, thanks for the suggestion, I will open an issue on the Arch bug tracker

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-23 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 updated this revision to Diff 462423. 10ne1 added a comment. Regenerated diff with git diff HEAD~1 -U99 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134454/new/ https://reviews.llvm.org/D134454 Files: clang/include/clang/Driver/Distro.h clang/lib/Driver/Distro.cpp clan

[PATCH] D134454: [Driver][Distro] Fix ArchLinux triplet and sysroot detection

2022-09-22 Thread Adrian Ratiu via Phabricator via cfe-commits
10ne1 created this revision. 10ne1 added reviewers: nickdesaulniers, nathanchance, manojgupta. Herald added a subscriber: kristof.beyls. Herald added a project: All. 10ne1 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. While cross-