[llvm-branch-commits] [flang] [llvm] [Flang-RT] Build libflang_rt.so (PR #121782)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 17 00:29:35 PST 2025
================
@@ -8,6 +8,12 @@
macro(enable_cuda_compilation name files)
if (FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT STREQUAL "CUDA")
+ if (NOT FLANG_RT_ENABLE_STATIC)
+ message(FATAL_ERROR
+ "FLANG_RT_ENABLE_STATIC is required for CUDA build of Flang-RT"
+ )
+ endif()
+
enable_language(CUDA)
set_target_properties(${name}
----------------
jeanPerier wrote:
I think this need to change to `${name}.static`. I saw you changed the arg of how this function was called, and that makes sense to me because flang_rt.staticPTX was a bit weird, but some references of name need to be updated I think.
I am getting a new cmake error without this with the latest update:
```
set_target_properties Can not find target to add properties to: flang_rt
```
Line 65 below, I am also getting an error:
```
Cannot specify include directories for target "flang_rt" which is not built
```
`{name}` in the foreach on line 64 needs to be `{name}.static`
https://github.com/llvm/llvm-project/pull/121782
More information about the llvm-branch-commits
mailing list