[clang] [clang][AIX] Fix -print-runtime-dir fallback on AIX (PR #141439)
Daniel Chen via cfe-commits
cfe-commits at lists.llvm.org
Mon May 26 08:25:17 PDT 2025
================
@@ -933,11 +933,16 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const {
if (auto Path = getPathForTriple(T))
return *Path;
- 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 (T.isOSAIX()) {
+ llvm::Triple AIXTriple;
+ if (T.getEnvironment() == Triple::UnknownEnvironment) {
+ // Strip unknown environment from the triple.
----------------
DanielCChen wrote:
Nit: this effectively strips the OSVersion as well. Since we moved them together, may be explicitly say it in the comment to make it clear.
https://github.com/llvm/llvm-project/pull/141439
More information about the cfe-commits
mailing list