File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -935,6 +935,13 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const {
935935 if (auto Path = getPathForTriple (T))
936936 return *Path;
937937
938+ // On AIX, the environment component is not used in the target sub dir name.
939+ if (T.isOSAIX () && T.hasEnvironment ()) {
940+ llvm::Triple AIXTriple (T.getArchName (), T.getVendorName (), llvm::Triple::getOSTypeName (T.getOS ()));
941+ if (auto Path = getPathForTriple (AIXTriple))
942+ return *Path;
943+ }
944+
938945 if (T.isOSzOS () &&
939946 (!T.getOSVersion ().empty () || !T.getEnvironmentVersion ().empty ())) {
940947 // Build the triple without version information
Original file line number Diff line number Diff line change 1616// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\
1717// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR64-PER-TARGET %s
1818
19+ // RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \
20+ // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\
21+ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s
22+
1923// PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}}
2024// PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}}
2125// PRINT-RUNTIME-DIR64-PER-TARGET: lib{{/|\\}}powerpc64-ibm-aix{{$}}
You can’t perform that action at this time.
0 commit comments