================
@@ -1,8 +1,16 @@
set(LLVM_LINK_COMPONENTS Support)
-add_clang_tool(offload-arch OffloadArch.cpp NVPTXArch.cpp AMDGPUArchByKFD.cpp
AMDGPUArchByHIP.cpp)
+add_clang_tool(offload-arch OffloadArch.cpp NVPTXArch.cpp AMDGPUArchByKFD.cpp
+ AMDGPUArchByHIP.cpp LevelZeroArch.cpp)
+
+find_path(OFFLOAD_ARCH_LEVEL_ZERO_INCLUDE_DIR NAMES level_zero/ze_api.h)
+if (OFFLOAD_ARCH_LEVEL_ZERO_INCLUDE_DIR)
+ target_include_directories(offload-arch PRIVATE
${OFFLOAD_ARCH_LEVEL_ZERO_INCLUDE_DIR})
+ target_compile_definitions(offload-arch PRIVATE HAVE_LEVEL_ZERO_HEADERS)
+endif()
----------------
adurang wrote:
Note we're not linking against the library (still using dlopen for accessing
the library) just using the headers.
Unlike the other targets it's a much larger piece that would need to be
added... it's a maintenance problem in the making.
https://github.com/llvm/llvm-project/pull/160570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits