[llvm] [CMake][Windows] Fix Debug config build when using MSBuild (PR #111765)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 19:52:12 PDT 2024


================
@@ -191,9 +191,13 @@ macro(add_tablegen target project)
 
   # FIXME: Quick fix to reflect LLVM_TABLEGEN to llvm-min-tblgen
   if("${target}" STREQUAL "llvm-min-tblgen"
-      AND NOT "${LLVM_TABLEGEN}" STREQUAL ""
-      AND NOT "${LLVM_TABLEGEN}" STREQUAL "llvm-tblgen")
-    set(${project}_TABLEGEN_DEFAULT "${LLVM_TABLEGEN}")
+      AND NOT "${LLVM_TABLEGEN}" STREQUAL "")
+    # Extract base filename from full path.
+    get_filename_component(RAW_LLVM_TABLEGEN ${LLVM_TABLEGEN} NAME_WE)
----------------
wjristow wrote:

I'm not sure I understand the question.  For me, when `${LLVM_TABLEGEN}` is of the form:
`C:\path\to\dir-within-build-dir\bin\llvm-tblgen.exe`

the line:
`get_filename_component(RAW_LLVM_TABLEGEN ${LLVM_TABLEGEN} NAME_WE)`

sets `RAW_LLVM_TABLEGEN` to simply `llvm-tblgen`, which is what I want -- essentially, enabling the change you made in 95d4506dda79d49e55fdd0e4da7bf81487167aa1.

https://github.com/llvm/llvm-project/pull/111765


More information about the llvm-commits mailing list