================
@@ -15,6 +15,7 @@
 # used for building this FortranFloat128Math library.
 
 include(CheckLibraryExists)
+include(CheckIncludeFile)
----------------
Meinersbur wrote:

1. In bootstrap builds, using just-built Clang/Flang as compiler 
(`CMAKE_*_COMPILER`) is hardcoded (that's where the name bootstrap comes from). 
You want a runtimes-only build here. Runtimes like offload could not even work 
with gcc since those generate LLVM-bc files for link-time compilation. To unify 
offloading accross runtimes, I think @jhuber6 would like to do something 
similar for Flang-RT.

2. Using `-DLLVM_ENABLE_RUNTIMES_PASSTHROUGH=ON` you can specify additional 
CMake variables that should be forwared to the runtimes build configuration. 
Specifying `CMAKE_CXX_FLAGS` here should be possible. Also, there is a 
[mechanism](https://github.com/llvm/llvm-project/blob/main/llvm/runtimes/CMakeLists.txt#L369-L393)
 to forward variables prefixed with `RUNTIMES_` or listed in 
`FLANG_RT_extra_args`, but I have never used it.

3. Not that I know of, but in my experience getting the configurations to match 
can easily go wrong.

I assume that you are going to try to point Clang to the location of gcc's 
`quadmath.h` and `libquadmath.a`? Clang autodetect a gcc installation and 
usually is able to reuse its files. Don't now why this doesn't happen for 
quadmath.

Note that relying on compiler and runtime having the same value of 
`FLANG_RUNTIME_F128_MATH_LIB` is something we should get away from, especially 
for cross-compilation. There is no guarantee that the target platform has 
libquadmath support only because the host platform has.

https://github.com/llvm/llvm-project/pull/110217
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to