================
@@ -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:

It's not the number of functions, it's the associated data types.

About the value, if you think of a local installation yes there's no 
difference. If it's something to be packaged and distributed, you can still 
compile it without requiring all libraries to be present at target machines.

In any case, I made the changes.

https://github.com/llvm/llvm-project/pull/160570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to