[llvm] [flang-rt] Add support for using LLVM in-tree libc/libc++ (PR #131695)

Daniel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 25 08:19:24 PDT 2025


DanielCChen wrote:

@jhuber6 
This commit broke our build of shared flang-rt on both AIX and LoP.
I have 
```
  cmake \
  ...
  -DFLANG_RT_ENABLE_SHARED=ON \
  -DFLANG_RT_ENABLE_STATIC=OFF \
  -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" \
  -DLLVM_ENABLE_RUNTIMES="compiler-rt;flang-rt" \
  llvm-project/llvm
```

I got the following error:
```
CMake Error at ./llvm-project/flang-rt/cmake/modules/AddFlangRT.cmake:146 (target_link_libraries):
  Cannot specify link libraries for target "flang_rt.runtime.static" which is
  not built by this project.
Call Stack (most recent call first):
  ./llvm-project/flang-rt/lib/runtime/CMakeLists.txt:182 (add_flangrt_library)
```

If I commented out line 146 in `AddFlangRT.cmake` both builds were successfully.

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


More information about the llvm-commits mailing list