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

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 30 22:59:24 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.
----------------
MaskRay wrote:

https://reviews.llvm.org/D133406

Is this transformation only needed by Solaris? It seems that other OSes are happy with always using x86_64 and not bothering with amd64.

Can you make this Solaris specific?

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


More information about the cfe-commits mailing list