================
@@ -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:

How would this change cause harm?  If a target uses e.g. an `x86_64-*` or 
`sparcv9-*` triple, it matches `compiler-rt` out of the box and this change 
doesn't make a difference.  If on the other hand a target uses the equivalent 
`amd64-*` or `sparc64-*` forms, they **need** to be transformed to the form 
that `compiler-rt` uses unconditionally, otherwise `clang` won't find the 
runtime libs.  This is what this patch does: bring `clang` and `compiler-rt` a 
little bit more in sync, nothing more, nothing less.  Where do you see any 
disruption in that?  Fixing tons of link failures in the testsuite isn't my 
definition of disruption, actually.

https://github.com/llvm/llvm-project/pull/100091
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to