DanielCChen wrote:

> > A more general question: It seems neither `compile-rt` nor `flang-rt` uses 
> > `getTargetSubDirPath`, so we didn't need to strip to the "base" triple. 
> > Sanitizer uses it apparently. Is it by design? @daltenty
> 
> I doubt it, this code is extremely messy and there's duplication everywhere, 
> so I suspect that diverged unintentionally

Yeah, I think I figured it out. I updated my inline comments to suggest a 
change.

It seems `getTargetSubDirPath` appends the triple dir to the argument. 
`getRuntimePath` calls `getTargetSubDirPath` with the argument of 
`resource-dir`/`lib`. Others pass different argument. For example, 
`getStdlibIncludePath` calls `getTargetSubDirPath`  with `..../include`. 


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

Reply via email to