mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 08:36:35 +00:00

The PR is to generalize the re-use of the `compilerRT` code of adding the path of `libflang_rt.runtime.a (so)` from AIX and LoP only to all platforms via a new function `addFlangRTLibPath`. It also added `-static-libflangrt` and `-shared-libflangrt` compiler options to allow users choosing which `flang-rt` to link to. It defaults to shared `flang-rt`, which is consistent with the linker behavior, except on AIX, it defaults to static. Also, PR #134320 exposed an issue in PR #131041 that the the overriding `addFortranRuntimeLibs` is missing the link to `libquadmath`. This PR also fixed that and restored the test case that PR #131041 broke.