DanielCChen wrote: @Meinersbur and all other reviewers,
In the attempt to make building the path of flant-rt more general as well as customizable in response to the review comment, I made the following change in this latest commit (sorry about a couple of more commits that fixed some typos). 1. Moved `addFortranRuntimeLibraryPath` and `addFortranRuntimeLibs` to `ToolChain.h` and made them `virtual` so that they can be overridden if customization is needed. The current implementation of those two procedures is moved to `ToolChain.cpp` as the base implementation to default to. 2. Both AIX and PPCLinux now override `addFortranRuntimeLibs`. Those are the two system I have access to, but the code could be used by others if suitable. 3. I re-used `compilerRT` code as much as possible. Now, `addFortranRuntimeLibs` calls `getCompilerRTArgString` => `getCompilerRT` => `buildCompilerRTBasename` to get the path to flang-rt. As shown in `PPCLinux.cpp`, `static` is the default. If not found, it will search and build for `shared`. To differentiate `flang-rt` from `clang-rt`, a boolean flag `IsFortran` is passed to the chain of functions. Please let me know if this approach is acceptable. https://github.com/llvm/llvm-project/pull/131041 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits