Skip to content

Commit 4007289

Browse files
callumfaresaiislam
authored andcommitted
[Offload] Explicitly create directories that contain tablegen output (llvm#142817)
This isn't required when building with Ninja, but with the Makefile generator these directories don't get implicitly created.
1 parent 659cbac commit 4007289

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

offload/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ add_subdirectory(DeviceRTL)
458458
# Build target agnostic offloading library.
459459
add_subdirectory(libomptarget)
460460

461-
add_subdirectory(liboffload)
461+
# FIXME: Re-enable once OMPT design allows
462+
# add_subdirectory(liboffload)
462463

463464
# Add tests.
464465
if(OFFLOAD_INCLUDE_TESTS)

offload/liboffload/API/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/OffloadAPI.td)
99
set(files_to_copy "")
10+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)
1011

1112
macro(offload_tablegen file)
1213
tablegen(OFFLOAD generated/${file}.gen ${ARGN})

offload/plugins-nextgen/common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# The error codes in this header are shared with liboffload, so need to be
22
# generated from the same source.
33
include(TableGen)
4+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
45
set(LLVM_TARGET_DEFINITIONS ${CMAKE_CURRENT_SOURCE_DIR}/../../liboffload/API/OffloadAPI.td)
56
tablegen(OFFLOAD include/OffloadErrcodes.inc -gen-errcodes -I ${CMAKE_CURRENT_SOURCE_DIR}/../../liboffload/API)
67
add_public_tablegen_target(PluginErrcodes)

0 commit comments

Comments
 (0)