Merge pull request #25447 from rongjiecomputer:fix_win_build
PiperOrigin-RevId: 236176304
diff --git a/configure.py b/configure.py
index 673825c..68097b3 100644
--- a/configure.py
+++ b/configure.py
@@ -1547,6 +1547,9 @@
write_to_bazelrc('build --config monolithic')
# Suppress warning messages
write_to_bazelrc('build --copt=-w --host_copt=-w')
+ # Fix winsock2.h conflicts
+ write_to_bazelrc(
+ 'build --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN')
# Output more verbose information when something goes wrong
write_to_bazelrc('build --verbose_failures')
# The host and target platforms are the same in Windows build. So we don't