================ @@ -50,43 +42,28 @@ macro(enable_cuda_compilation name files) "${CUDA_COMPILE_OPTIONS}" ) - if (EXISTS "${FLANG_LIBCUDACXX_PATH}/include") + if (EXISTS "${FLANG_RT_LIBCUDACXX_PATH}/include") # When using libcudacxx headers files, we have to use them # for all files of F18 runtime. - include_directories(AFTER ${FLANG_LIBCUDACXX_PATH}/include) + include_directories(AFTER ${FLANG_RT_LIBCUDACXX_PATH}/include) add_compile_definitions(RT_USE_LIBCUDACXX=1) endif() # Add an OBJECT library consisting of CUDA PTX. - llvm_add_library(${name}PTX OBJECT PARTIAL_SOURCES_INTENDED ${files}) - set_property(TARGET obj.${name}PTX PROPERTY CUDA_PTX_COMPILATION ON) - if (FLANG_CUDA_RUNTIME_PTX_WITHOUT_GLOBAL_VARS) - target_compile_definitions(obj.${name}PTX - PRIVATE FLANG_RUNTIME_NO_GLOBAL_VAR_DEFS + add_flangrt_library(${name}PTX OBJECT ${files}) ---------------- jeanPerier wrote:
Also, I think the `OBJECT` processing [in llvm_add_library](https://github.com/llvm/llvm-project/blob/0baa6a7272970257fd6f527e95eb7cb18ba3361c/llvm/cmake/modules/AddLLVM.cmake#L565) is more complex and also implies `STATIC` (that is, it both triggers [an object build for the `obj.${name}PTX`](https://github.com/llvm/llvm-project/blob/0baa6a7272970257fd6f527e95eb7cb18ba3361c/llvm/cmake/modules/AddLLVM.cmake#L568), and a [STATIC build for the `${name}PTX`](https://github.com/llvm/llvm-project/blob/0baa6a7272970257fd6f527e95eb7cb18ba3361c/llvm/cmake/modules/AddLLVM.cmake#L644)). I do not think this is happening with `add_flangrt_library` that only makes an object build. 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