File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -935,10 +935,10 @@ 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 (),
941- llvm::Triple::getOSTypeName (T.getOS ()));
938+ if (T. isOSAIX () && T. getEnvironment () == Triple::UnknownEnvironment) {
939+ // Strip unknown environment from the triple.
940+ const llvm::Triple AIXTriple ( llvm::Triple (T.getArchName (), T.getVendorName (),
941+ llvm::Triple::getOSTypeName (T.getOS () )));
942942 if (auto Path = getPathForTriple (AIXTriple))
943943 return *Path;
944944 }
Original file line number Diff line number Diff line change 1818
1919// RUN: %clang -print-runtime-dir --target=powerpc-ibm-aix-unknown \
2020// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir\
21- // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR32-PER-TARGET %s
21+ // RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR-UNKNOWN-ENV %s
2222
2323// PRINT-RUNTIME-DIR: lib{{/|\\}}aix{{$}}
2424// PRINT-RUNTIME-DIR32-PER-TARGET: lib{{/|\\}}powerpc-ibm-aix{{$}}
2525// PRINT-RUNTIME-DIR64-PER-TARGET: lib{{/|\\}}powerpc64-ibm-aix{{$}}
26+ // PRINT-RUNTIME-DIR-UNKNOWN-ENV: lib{{/|\\}}powerpc-ibm-aix
You can’t perform that action at this time.
0 commit comments