Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions llvm/cmake/modules/TableGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,13 @@ macro(add_tablegen target project)
endif()

# FIXME: Quick fix to reflect LLVM_TABLEGEN to llvm-min-tblgen
set(RAW_LLVM_TABLEGEN ${LLVM_TABLEGEN})
if(NOT "${RAW_LLVM_TABLEGEN}" STREQUAL "")
get_filename_component(RAW_LLVM_TABLEGEN ${RAW_LLVM_TABLEGEN} NAME_WE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it match if ${LLVM_TABLEGEN} points to X:/out-of-tree/path/to/llvm-tblgen.exe? I don't think it'd be desirable.

endif()
if("${target}" STREQUAL "llvm-min-tblgen"
AND NOT "${LLVM_TABLEGEN}" STREQUAL ""
AND NOT "${LLVM_TABLEGEN}" STREQUAL "llvm-tblgen")
AND NOT "${RAW_LLVM_TABLEGEN}" STREQUAL ""
AND NOT "${RAW_LLVM_TABLEGEN}" STREQUAL "llvm-tblgen")
set(${project}_TABLEGEN_DEFAULT "${LLVM_TABLEGEN}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose ${LLVM_TABLEGEN} is llvm-tblgen by default.
You can modify it if you want to use out-of-tree llvm-tblgen.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use an out-of-tree llvm-tblgen. For me, on input to this block, ${LLVM_TABLEGEN} is of the form:
C:\path\to\dir-within-build-dir\bin\llvm-tblgen.exe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, ${LLVM_TABLEGEN} is llvm-tblgen by default.

endif()

Expand Down
Loading