[Offload] Explicitly create directories that contain tablegen output (#142817)

This isn't required when building with Ninja, but with the Makefile
generator these directories don't get implicitly created.
This commit is contained in:
Callum Fare
2025-06-04 19:46:19 +01:00
committed by GitHub
parent 246fa9a9f7
commit f44df93a9c
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/OffloadAPI.td)
set(files_to_copy "")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)
macro(offload_tablegen file)
tablegen(OFFLOAD generated/${file}.gen ${ARGN})

View File

@@ -1,6 +1,7 @@
# The error codes in this header are shared with liboffload, so need to be
# generated from the same source.
include(TableGen)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/../../liboffload/API/OffloadAPI.td)
tablegen(OFFLOAD include/OffloadErrcodes.inc -gen-errcodes -I ${CMAKE_CURRENT_SOURCE_DIR}/../../liboffload/API)
add_public_tablegen_target(PluginErrcodes)