Skip to content

Commit fac1b1a

Browse files
hawkinspGoogle-ML-Automation
authored andcommitted
Set -Werror=mismatched-tags on clang.
This means we see a helpful compiler error rather than a cryptic linker error if struct/class tags are mismatched. PiperOrigin-RevId: 703491110
1 parent 9081e85 commit fac1b1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=1
104104
build:clang --copt=-Wno-gnu-offsetof-extensions
105105
# Disable clang extention that rejects unknown arguments.
106106
build:clang --copt=-Qunused-arguments
107+
# Error on struct/class mismatches, since this causes link failures on Windows.
108+
build:clang --copt=-Werror=mismatched-tags
107109

108110
# Configs for CUDA
109111
build:cuda --repo_env TF_NEED_CUDA=1

0 commit comments

Comments
 (0)