Skip to content

Commit b97369c

Browse files
committed
EISW-173753 Fix invalid TableGen flag in LLVM 20.x causing precommit failure
Exclude --no-warn-on-unused-template-args for mlir-src-sharder. This flag is not recognized by mlir-src-sharder and causes a build failure. Exclude it conditionally while preserving it for other tools that support it.
1 parent a87e111 commit b97369c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/cmake/modules/TableGen.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function(tablegen project ofn)
8080
set(tblgen_change_flag "--write-if-changed")
8181
endif()
8282

83-
if (NOT LLVM_ENABLE_WARNINGS)
84-
list(APPEND LLVM_TABLEGEN_FLAGS "-Dno-warn-on-unused-template-args")
83+
if (NOT LLVM_ENABLE_WARNINGS AND NOT LLVM_TABLEGEN_EXE MATCHES "mlir-src-sharder")
84+
list(APPEND LLVM_TABLEGEN_FLAGS "--no-warn-on-unused-template-args")
8585
endif()
8686

8787
# We need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list

0 commit comments

Comments
 (0)