-
Notifications
You must be signed in to change notification settings - Fork 664
fix(llvm,llvm20): add azurelinux-specific triple to clang default fallback list #17607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ddstreetmicrosoft
merged 2 commits into
4.0
from
tobiasb-ms/add-azurelinux-to-llvm-triples
Jun 11, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
base/comps/llvm/0001-Clang-Add-azurelinux-to-fallback-triples.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| From 59fc631cea3757e47f8cb202f388c228ce070994 Mon Sep 17 00:00:00 2001 | ||
| From: Tobias Brick <tobiasb@microsoft.com> | ||
| Date: Fri, 29 May 2026 19:08:42 +0000 | ||
| Subject: [PATCH] [Clang] Add azurelinux to fallback triples | ||
|
|
||
| --- | ||
| clang/lib/Driver/ToolChains/Gnu.cpp | 6 +++-- | ||
| .../Driver/Inputs/azurelinux_tree/lib/.keep | 0 | ||
| .../aarch64-azurelinux-linux/11/crtbegin.o | 0 | ||
| .../gcc/aarch64-azurelinux-linux/11/crtend.o | 0 | ||
| .../gcc/x86_64-azurelinux-linux/11/crtbegin.o | 0 | ||
| .../gcc/x86_64-azurelinux-linux/11/crtend.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crt1.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crti.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crtn.o | 0 | ||
| clang/test/Driver/linux-ld.c | 22 +++++++++++++++++++ | ||
| 10 files changed, 26 insertions(+), 2 deletions(-) | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/lib/.keep | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o | ||
|
|
||
| diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| index 131dd725c728..6c1e67bd0fff 100644 | ||
| --- a/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| +++ b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| @@ -2337,7 +2337,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( | ||
| // lists should shrink over time. Please don't add more elements to *Triples. | ||
| static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; | ||
| static const char *const AArch64Triples[] = { | ||
| - "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux"}; | ||
| + "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux", | ||
| + "aarch64-azurelinux-linux"}; | ||
| static const char *const AArch64beLibDirs[] = {"/lib"}; | ||
| static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"}; | ||
|
|
||
| @@ -2365,7 +2366,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( | ||
| "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", | ||
| "x86_64-redhat-linux", "x86_64-suse-linux", | ||
| "x86_64-manbo-linux-gnu", "x86_64-slackware-linux", | ||
| - "x86_64-unknown-linux", "x86_64-amazon-linux"}; | ||
| + "x86_64-unknown-linux", "x86_64-amazon-linux", | ||
| + "x86_64-azurelinux-linux"}; | ||
| static const char *const X32Triples[] = {"x86_64-linux-gnux32", | ||
| "x86_64-pc-linux-gnux32"}; | ||
| static const char *const X32LibDirs[] = {"/libx32", "/lib"}; | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/lib/.keep b/clang/test/Driver/Inputs/azurelinux_tree/lib/.keep | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c | ||
| index 8de1988d606c..787b22f26628 100644 | ||
| --- a/clang/test/Driver/linux-ld.c | ||
| +++ b/clang/test/Driver/linux-ld.c | ||
| @@ -1789,6 +1789,28 @@ | ||
| // CHECK-LD-AMI: "-lc" | ||
| // CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" | ||
|
|
||
| + | ||
| +// Check that Azure Linux GCC is found via fallback triple detection (x86_64). | ||
| +// The sysroot has GCC installed under x86_64-azurelinux-linux, but we target | ||
| +// the generic x86_64-unknown-linux-gnu to exercise the fallback triple list. | ||
| +// RUN: %clang -### %s -no-pie 2>&1 \ | ||
| +// RUN: --target=x86_64-unknown-linux-gnu -rtlib=libgcc --unwindlib=platform \ | ||
| +// RUN: --sysroot=%S/Inputs/azurelinux_tree \ | ||
| +// RUN: | FileCheck --check-prefix=CHECK-LD-AZURELINUX %s | ||
| +// CHECK-LD-AZURELINUX: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" | ||
| +// CHECK-LD-AZURELINUX: "{{.*}}/usr/lib/gcc/x86_64-azurelinux-linux/11{{/|\\\\}}crtbegin.o" | ||
| +// CHECK-LD-AZURELINUX: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-azurelinux-linux/11" | ||
| +// CHECK-LD-AZURELINUX: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-azurelinux-linux/11/../../../../lib64" | ||
| + | ||
| +// Check that Azure Linux GCC is found via fallback triple detection (aarch64). | ||
| +// RUN: %clang -### %s -no-pie 2>&1 \ | ||
| +// RUN: --target=aarch64-unknown-linux-gnu -rtlib=libgcc --unwindlib=platform \ | ||
| +// RUN: --sysroot=%S/Inputs/azurelinux_tree \ | ||
| +// RUN: | FileCheck --check-prefix=CHECK-LD-AZURELINUX-AARCH64 %s | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-azurelinux-linux/11{{/|\\\\}}crtbegin.o" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-azurelinux-linux/11" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-azurelinux-linux/11/../../../../lib64" | ||
| // Check whether the OpenEmbedded ARM libs are added correctly. | ||
| // RUN: %clang -### %s -no-pie 2>&1 \ | ||
| // RUN: --target=arm-oe-linux-gnueabi -rtlib=libgcc --unwindlib=platform \ | ||
| -- | ||
| 2.52.0 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
base/comps/llvm20/0001-Clang-Add-azurelinux-to-fallback-triples.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| From 59fc631cea3757e47f8cb202f388c228ce070994 Mon Sep 17 00:00:00 2001 | ||
| From: Tobias Brick <tobiasb@microsoft.com> | ||
| Date: Fri, 29 May 2026 19:08:42 +0000 | ||
| Subject: [PATCH] [Clang] Add azurelinux to fallback triples | ||
|
|
||
| --- | ||
| clang/lib/Driver/ToolChains/Gnu.cpp | 6 +++-- | ||
| .../Driver/Inputs/azurelinux_tree/lib/.keep | 0 | ||
| .../aarch64-azurelinux-linux/11/crtbegin.o | 0 | ||
| .../gcc/aarch64-azurelinux-linux/11/crtend.o | 0 | ||
| .../gcc/x86_64-azurelinux-linux/11/crtbegin.o | 0 | ||
| .../gcc/x86_64-azurelinux-linux/11/crtend.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crt1.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crti.o | 0 | ||
| .../Inputs/azurelinux_tree/usr/lib64/crtn.o | 0 | ||
| clang/test/Driver/linux-ld.c | 22 +++++++++++++++++++ | ||
| 10 files changed, 26 insertions(+), 2 deletions(-) | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/lib/.keep | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o | ||
| create mode 100644 clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o | ||
|
|
||
| diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| index 131dd725c728..6c1e67bd0fff 100644 | ||
| --- a/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| +++ b/clang/lib/Driver/ToolChains/Gnu.cpp | ||
| @@ -2337,7 +2337,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( | ||
| // lists should shrink over time. Please don't add more elements to *Triples. | ||
| static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; | ||
| static const char *const AArch64Triples[] = { | ||
| - "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux"}; | ||
| + "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux", | ||
| + "aarch64-azurelinux-linux"}; | ||
| static const char *const AArch64beLibDirs[] = {"/lib"}; | ||
| static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"}; | ||
|
|
||
| @@ -2365,7 +2366,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( | ||
| "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", | ||
| "x86_64-redhat-linux", "x86_64-suse-linux", | ||
| "x86_64-manbo-linux-gnu", "x86_64-slackware-linux", | ||
| - "x86_64-unknown-linux", "x86_64-amazon-linux"}; | ||
| + "x86_64-unknown-linux", "x86_64-amazon-linux", | ||
| + "x86_64-azurelinux-linux"}; | ||
| static const char *const X32Triples[] = {"x86_64-linux-gnux32", | ||
| "x86_64-pc-linux-gnux32"}; | ||
| static const char *const X32LibDirs[] = {"/libx32", "/lib"}; | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/lib/.keep b/clang/test/Driver/Inputs/azurelinux_tree/lib/.keep | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtbegin.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/aarch64-azurelinux-linux/11/crtend.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtbegin.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib/gcc/x86_64-azurelinux-linux/11/crtend.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crt1.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crti.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o b/clang/test/Driver/Inputs/azurelinux_tree/usr/lib64/crtn.o | ||
| new file mode 100644 | ||
| index 000000000000..e69de29bb2d1 | ||
| diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c | ||
| index 8de1988d606c..787b22f26628 100644 | ||
| --- a/clang/test/Driver/linux-ld.c | ||
| +++ b/clang/test/Driver/linux-ld.c | ||
| @@ -1789,6 +1789,28 @@ | ||
| // CHECK-LD-AMI: "-lc" | ||
| // CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" | ||
|
|
||
| + | ||
| +// Check that Azure Linux GCC is found via fallback triple detection (x86_64). | ||
| +// The sysroot has GCC installed under x86_64-azurelinux-linux, but we target | ||
| +// the generic x86_64-unknown-linux-gnu to exercise the fallback triple list. | ||
| +// RUN: %clang -### %s -no-pie 2>&1 \ | ||
| +// RUN: --target=x86_64-unknown-linux-gnu -rtlib=libgcc --unwindlib=platform \ | ||
| +// RUN: --sysroot=%S/Inputs/azurelinux_tree \ | ||
| +// RUN: | FileCheck --check-prefix=CHECK-LD-AZURELINUX %s | ||
| +// CHECK-LD-AZURELINUX: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" | ||
| +// CHECK-LD-AZURELINUX: "{{.*}}/usr/lib/gcc/x86_64-azurelinux-linux/11{{/|\\\\}}crtbegin.o" | ||
| +// CHECK-LD-AZURELINUX: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-azurelinux-linux/11" | ||
| +// CHECK-LD-AZURELINUX: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-azurelinux-linux/11/../../../../lib64" | ||
| + | ||
| +// Check that Azure Linux GCC is found via fallback triple detection (aarch64). | ||
| +// RUN: %clang -### %s -no-pie 2>&1 \ | ||
| +// RUN: --target=aarch64-unknown-linux-gnu -rtlib=libgcc --unwindlib=platform \ | ||
| +// RUN: --sysroot=%S/Inputs/azurelinux_tree \ | ||
| +// RUN: | FileCheck --check-prefix=CHECK-LD-AZURELINUX-AARCH64 %s | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-azurelinux-linux/11{{/|\\\\}}crtbegin.o" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-azurelinux-linux/11" | ||
| +// CHECK-LD-AZURELINUX-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-azurelinux-linux/11/../../../../lib64" | ||
| // Check whether the OpenEmbedded ARM libs are added correctly. | ||
| // RUN: %clang -### %s -no-pie 2>&1 \ | ||
| // RUN: --target=arm-oe-linux-gnueabi -rtlib=libgcc --unwindlib=platform \ | ||
| -- | ||
| 2.52.0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not thrilled by this...as the comment just a few lines above says, "Please don't add more elements to *Triples". But digging into how to avoid this ourselves probably isn't appropriate or worth the time (trying to get upstream to fix the need for this hardcoded list is the right way to avoid this).
So this looks ok to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, though options are limited. I do think that the Fedora change https://src.fedoraproject.org/rpms/llvm/c/879a14ed99a04dbfca4e3c3c57abb33b61e1a3dc?branch=rawhide will mostly obviate the need for this as it will install the config files that have these triples with
clang-libsrather thanclang. But this fallback is probably good to have anyway.FWIW, I've also submitted a PR to LLVM: llvm/llvm-project#200894, but not traction thus far (and as the you suggest, based on the comment, I wouldn't be surprised if they reject it).