mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Teach tablegen() macro to check needed variables
This macro depends on several variables to be set in the calling context. Check them and report an error if they are not set. Without this, custom commands may be silently specified that will fail at build time. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201229 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eee40f92a9
commit
dd5ff1bf41
@ -3,6 +3,17 @@
|
||||
# Adds the name of the generated file to TABLEGEN_OUTPUT.
|
||||
|
||||
function(tablegen project ofn)
|
||||
# Validate calling context.
|
||||
foreach(v
|
||||
${project}_TABLEGEN_EXE
|
||||
LLVM_MAIN_SRC_DIR
|
||||
LLVM_MAIN_INCLUDE_DIR
|
||||
)
|
||||
if(NOT ${v})
|
||||
message(FATAL_ERROR "${v} not set")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
file(GLOB local_tds "*.td")
|
||||
file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user