[clang] [Driver] Have getTargetSubDirPath better match get_compiler_rt_target (PR #100091)

Rainer Orth via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 01:16:52 PDT 2024


================
@@ -766,9 +766,19 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const {
     return {};
   };
 
-  if (auto Path = getPathForTriple(getTriple()))
+  llvm::Triple Triple = getTriple();
+
+  // Try triple as is.
+  if (auto Path = getPathForTriple(Triple))
     return *Path;
 
+  // Match transformations in CompilerRTUtils.cmake:get_compiler_rt_target.
----------------
rorth wrote:

It's not, some BSDs prefer the `amd64` form, too.  Besides, `get_compiler_rt_target` does it unconditionally, so `clang` should match.

https://github.com/llvm/llvm-project/pull/100091


More information about the cfe-commits mailing list