[llvm] [flang-rt] Use --as-needed for linking flang-rt libraries. (PR #130856)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 11 16:57:21 PDT 2025


Meinersbur wrote:

I don't it does what you think it does. The static library is just a collection of object files. Only when linking the executable you actually know what "is needed". Until then, you want all the object files in the library.

We actually have a test that checks that no libc++ dependencies are required: https://github.com/llvm/llvm-project/blob/main/flang-rt/test/Runtime/no-cpp-dep.c

https://github.com/llvm/llvm-project/pull/130856


More information about the llvm-commits mailing list