Build MLIR with -Werror=mismatched-tags (NFC)
This is a defensive action to catch at build time on Linux failures that may happen only on Windows otherwise. Differential Revision: https://reviews.llvm.org/D115316
This commit is contained in:
parent
60f826663d
commit
3bed2a7212
|
@ -48,6 +48,13 @@ endif()
|
||||||
check_c_compiler_flag("-Werror=implicit-function-declaration" C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION)
|
check_c_compiler_flag("-Werror=implicit-function-declaration" C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION)
|
||||||
append_if(C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION "-Werror=implicit-function-declaration" CMAKE_C_FLAGS)
|
append_if(C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION "-Werror=implicit-function-declaration" CMAKE_C_FLAGS)
|
||||||
|
|
||||||
|
# Forbid mismatch between declaration and definition for class vs struct. This is
|
||||||
|
# harmless on Unix systems, but it'll be a ticking bomb for MSVC/Windows systems
|
||||||
|
# where it creeps into the ABI.
|
||||||
|
check_c_compiler_flag("-Werror=mismatched-tags" C_SUPPORTS_WERROR_MISMATCHED_TAGS)
|
||||||
|
append_if(C_SUPPORTS_WERROR_MISMATCHED_TAGS "-Werror=mismatched-tags" CMAKE_C_FLAGS)
|
||||||
|
append_if(C_SUPPORTS_WERROR_MISMATCHED_TAGS "-Werror=mismatched-tags" CMAKE_CXX_FLAGS)
|
||||||
|
|
||||||
# Installing the headers and docs needs to depend on generating any public
|
# Installing the headers and docs needs to depend on generating any public
|
||||||
# tablegen'd targets.
|
# tablegen'd targets.
|
||||||
# mlir-generic-headers are dialect-independent.
|
# mlir-generic-headers are dialect-independent.
|
||||||
|
|
Loading…
Reference in a new issue