[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/140850 >From 120423abadbfd63dbb50387fb5ce26ff0f3ff257 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 21 May 2025 01:51:00 -0400 Subject: [PATCH 1/3] Handle triple environment component for target runtime directory on AIX --- clang/lib/Driver/ToolChain.cpp| 7 +++ clang/test/Driver/aix-print-runtime-dir.c | 4 2 files changed, 11 insertions(+) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 664aafad0f680..90fb0375d1925 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -935,6 +935,13 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. + if (T.isOSAIX() && T.hasEnvironment()) { +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +if (auto Path = getPathForTriple(AIXTriple)) + return *Path; + } + if (T.isOSzOS() && (!T.getOSVersion().empty() || !T.getEnvironmentVersion().empty())) { // Build the triple without version information diff --git a/clang/test/Driver/aix-print-runtime-dir.c b/clang/test/Driver/aix-print-runtime-dir.c index ffa4d15c21208..ad841cb4f9b5b 100644 --- a/clang/test/Driver/aix-print-runtime-dir.c +++ b/clang/test/Driver/aix-print-runtime-dir.c @@ -16,6 +16,10 @@ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s +// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ +// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ +// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s + // PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}} // PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}} // PRINT-RUNTIME-DIR64-PER-TARGET: lib{{/|\\}}powerpc64-ibm-aix{{$}} >From 6ed30e6b6b1a1627c554f2ec7c08d5014a21251c Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 21 May 2025 09:45:50 -0400 Subject: [PATCH 2/3] Fix formatting --- clang/lib/Driver/ToolChain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 90fb0375d1925..4d66a53dad134 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -937,7 +937,8 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { // On AIX, the environment component is not used in the target sub dir name. if (T.isOSAIX() && T.hasEnvironment()) { -llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), + llvm::Triple::getOSTypeName(T.getOS())); if (auto Path = getPathForTriple(AIXTriple)) return *Path; } >From 2f230ce42da85029964bfa82c96eb09bb2cfae90 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Thu, 22 May 2025 22:11:59 -0400 Subject: [PATCH 3/3] Only strip -unknown environment component --- clang/lib/Driver/ToolChain.cpp| 8 clang/test/Driver/aix-print-runtime-dir.c | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 4d66a53dad134..9875f2096f89b 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -935,10 +935,10 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; - // On AIX, the environment component is not used in the target sub dir name. - if (T.isOSAIX() && T.hasEnvironment()) { -llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), - llvm::Triple::getOSTypeName(T.getOS())); + if (T.isOSAIX() && T.getEnvironment() == Triple::UnknownEnvironment) { +// Strip unknown environment from the triple. +const llvm::Triple AIXTriple(llvm::Triple(T.getArchName(), T.getVendorName(), + llvm::Triple::getOSTypeName(T.getOS(; if (auto Path = getPathForTriple(AIXTriple)) return *Path; } diff --git a/clang/test/Driver/aix-print-runtime-dir.c b/clang/test/Driver/aix-print-runtime-dir.c index ad841cb4f9b5b..16fe59c918804 100644 --- a/clang/test/Driver/aix-print-runtime-dir.c +++ b/clang/test/Driver/aix-print-runtime-dir.c @@ -18,8 +18,9 @@ // RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ -// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s +// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR-UNKNOWN-ENV %s // PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}} // PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -16,6 +16,10 @@ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s +// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ DanielCChen wrote: The target should be without the `-unknown` part if the checking below uses `power-ibm-aix`. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. jakeegan wrote: It returns an `EnvironmentType` which can be used with `getEnvironmentTypeName` to get the string. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen deleted https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -16,6 +16,10 @@ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s +// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ +// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ +// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s + // PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}} // PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}} DanielCChen wrote: If the target is `powerpc-ibm-aix-unknow`, it should also check that. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. DanielCChen wrote: I think it is correct that the `-unknown` is NOT stripped. I built `flang-rt` with `-DLLVM_DEFAULT_TARGET_TRIPLE=powerpc64-ibm-aix-unknown \`, `libflang_rt.runtime.a` is published to `./lib/clang/21/lib/powerpc64-ibm-aix-unknown/libflang_rt.runtime.a`. which is expected. The test cases should be changed to remove the `-unknown` part of add a separate dir for that specific testing. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen deleted https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
DanielCChen wrote: > A more general question: > It seems neither `compile-rt` nor `flang-rt` uses `getTargetSubDirPath`, so > we didn't need to strip to the "base" triple. > Sanitizer uses it apparently. Is it by design? The reason we didn't need to change `getTargetSubDirPath` is because we striped the triple in its caller, `getRuntimePath`. I think the best way is to do it in `getTargetSubDirPaht` instead of `getRuntimePath` as I suggested in my inline comment. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/jakeegan edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. jakeegan wrote: Actually, getRuntimePath already calls getTripleWithoutOSVersion for AIX, but it doesn't strip -unknown, so it creates a path like lib/powerpc-ibm-aix-unknown https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. jakeegan wrote: `getTripleWithoutOSVersion` seems to preserve the trailing -unknown component. I considered modifying it to strip that too, but that would do more than what the name of the function implies. I could add `T.isOSAIX()` to that block as you said if we're fine with modifying `getTripleWithoutOSVersion` to strip `-unknown` too. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
DanielCChen wrote: > > A more general question: It seems neither `compile-rt` nor `flang-rt` uses > > `getTargetSubDirPath`, so we didn't need to strip to the "base" triple. > > Sanitizer uses it apparently. Is it by design? @daltenty > > I doubt it, this code is extremely messy and there's duplication everywhere, > so I suspect that diverged unintentionally Yeah, I think I figured it out. I updated my inline comments to suggest a change. It seems `getTargetSubDirPath` appends the triple dir to the argument. `getRuntimePath` calls `getTargetSubDirPath` with the argument of `resource-dir`/`lib`. Others pass different argument. For example, `getStdlibIncludePath` calls `getTargetSubDirPath` with `/include`. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. DanielCChen wrote: After re-exam the code, I think we can move the code I linked from `getRuntimePath` to `getTargetSubDirPath`. It will probably be OK to add a check of `T.isOSAIX()` in the same block of `T.isOSzOS` so `getTripleWithoutOSVersion` can be re-used. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
DanielCChen wrote: A more general question: It seems neither `compile-rt` nor `flang-rt` uses `getTargetSubDirPath`, so we didn't need to strip to the "base" triple. Sanitizer uses it apparently. Is it by design? @daltenty https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
@@ -935,6 +935,14 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. DanielCChen wrote: We already have a similar code that strip everything after the "base" triple (powerpc[64]-ibm-aix). https://github.com/llvm/llvm-project/blob/6ed30e6b6b1a1627c554f2ec7c08d5014a21251c/clang/lib/Driver/ToolChain.cpp#L913 I think you can reuse that. https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/140850 >From 120423abadbfd63dbb50387fb5ce26ff0f3ff257 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 21 May 2025 01:51:00 -0400 Subject: [PATCH 1/2] Handle triple environment component for target runtime directory on AIX --- clang/lib/Driver/ToolChain.cpp| 7 +++ clang/test/Driver/aix-print-runtime-dir.c | 4 2 files changed, 11 insertions(+) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 664aafad0f680..90fb0375d1925 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -935,6 +935,13 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. + if (T.isOSAIX() && T.hasEnvironment()) { +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +if (auto Path = getPathForTriple(AIXTriple)) + return *Path; + } + if (T.isOSzOS() && (!T.getOSVersion().empty() || !T.getEnvironmentVersion().empty())) { // Build the triple without version information diff --git a/clang/test/Driver/aix-print-runtime-dir.c b/clang/test/Driver/aix-print-runtime-dir.c index ffa4d15c21208..ad841cb4f9b5b 100644 --- a/clang/test/Driver/aix-print-runtime-dir.c +++ b/clang/test/Driver/aix-print-runtime-dir.c @@ -16,6 +16,10 @@ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s +// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ +// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ +// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s + // PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}} // PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}} // PRINT-RUNTIME-DIR64-PER-TARGET: lib{{/|\\}}powerpc64-ibm-aix{{$}} >From 6ed30e6b6b1a1627c554f2ec7c08d5014a21251c Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 21 May 2025 09:45:50 -0400 Subject: [PATCH 2/2] Fix formatting --- clang/lib/Driver/ToolChain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 90fb0375d1925..4d66a53dad134 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -937,7 +937,8 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { // On AIX, the environment component is not used in the target sub dir name. if (T.isOSAIX() && T.hasEnvironment()) { -llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), + llvm::Triple::getOSTypeName(T.getOS())); if (auto Path = getPathForTriple(AIXTriple)) return *Path; } ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/lib/Driver/ToolChain.cpp clang/test/Driver/aix-print-runtime-dir.c `` View the diff from clang-format here. ``diff diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 90fb0375d..4d66a53da 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -937,7 +937,8 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { // On AIX, the environment component is not used in the target sub dir name. if (T.isOSAIX() && T.hasEnvironment()) { -llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), + llvm::Triple::getOSTypeName(T.getOS())); if (auto Path = getPathForTriple(AIXTriple)) return *Path; } `` https://github.com/llvm/llvm-project/pull/140850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Handle triple environment component for per target runtime directory (PR #140850)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/140850 Previously, when the triple is `powerpc-ibm-aix-unknown`, the driver fails to find subdirectory `lib/powerpc-ibm-aix`. This ensures the correct runtime path is found if the triple has the environment component attached. >From 120423abadbfd63dbb50387fb5ce26ff0f3ff257 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 21 May 2025 01:51:00 -0400 Subject: [PATCH] Handle triple environment component for target runtime directory on AIX --- clang/lib/Driver/ToolChain.cpp| 7 +++ clang/test/Driver/aix-print-runtime-dir.c | 4 2 files changed, 11 insertions(+) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 664aafad0f680..90fb0375d1925 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -935,6 +935,13 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { if (auto Path = getPathForTriple(T)) return *Path; + // On AIX, the environment component is not used in the target sub dir name. + if (T.isOSAIX() && T.hasEnvironment()) { +llvm::Triple AIXTriple(T.getArchName(), T.getVendorName(), llvm::Triple::getOSTypeName(T.getOS())); +if (auto Path = getPathForTriple(AIXTriple)) + return *Path; + } + if (T.isOSzOS() && (!T.getOSVersion().empty() || !T.getEnvironmentVersion().empty())) { // Build the triple without version information diff --git a/clang/test/Driver/aix-print-runtime-dir.c b/clang/test/Driver/aix-print-runtime-dir.c index ffa4d15c21208..ad841cb4f9b5b 100644 --- a/clang/test/Driver/aix-print-runtime-dir.c +++ b/clang/test/Driver/aix-print-runtime-dir.c @@ -16,6 +16,10 @@ // RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s +// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \ +// RUN:-resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\ +// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s + // PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}} // PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}} // PRINT-RUNTIME-DIR64-PER-TARGET: lib{{/|\\}}powerpc64-ibm-aix{{$}} ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits