aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorDaniel Chen <cdchen@ca.ibm.com>2025-04-03 11:21:19 -0400
committerGitHub <noreply@github.com>2025-04-03 11:21:19 -0400
commit2080334574a88a7ac4102007b56809cd0a19b905 (patch)
treeed68bf59e06ba54ee3a31e989fd8d9ae263ff689 /llvm/lib/IR/ConstantFold.cpp
parentf23bb530cfad1ca72812d0daf599834ea2291219 (diff)
downloadllvm-2080334574a88a7ac4102007b56809cd0a19b905.zip
llvm-2080334574a88a7ac4102007b56809cd0a19b905.tar.gz
llvm-2080334574a88a7ac4102007b56809cd0a19b905.tar.bz2
[flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX and LoP (#131041)
This PR is to improve the driver code to build `flang-rt` path by re-using the logic and code of `compiler-rt`. 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`. The overriding function of `addFortranRuntimeLibs` for both AIX and PPCLinux calls `getCompilerRTArgString` => `getCompilerRT` => `buildCompilerRTBasename` to get the path to `flang-rt`. This code handles `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` setting. As shown in `PPCLinux.cpp`, `FT_static` is the default. If not found, it will search and build for `FT_shared`. To differentiate `flang-rt` from `clang-rt`, a boolean flag `IsFortran` is passed to the chain of functions in order to reach `buildCompilerRTBasename`.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
0 files changed, 0 insertions, 0 deletions