Skip to content

Commit

Permalink
[build] Silence noisy Windows warnings
Browse files Browse the repository at this point in the history
This makes the Windows build log much smaller.
  • Loading branch information
fhanau committed Oct 19, 2024
1 parent 35440aa commit 17649ff
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,15 @@ https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html
build:unix --cxxopt=-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES
build:unix --host_cxxopt=-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES

# Need to redefine _WIN32_WINNT to build dawn on Windows
build:windows --per_file_copt='external/dawn@-Wno-macro-redefined'
build:windows --host_per_file_copt='external/dawn@-Wno-macro-redefined'
# V8 redefines the _WIN32_WINNT set by bazel, disable warnings for redefined macros. Since V8 uses
# a global define for this, we need to apply it for everything.
# TODO(cleanup): Patch upstream V8 to use local_defines for this instead.
build:windows --copt='-Wno-macro-redefined'
build:windows --host_copt='-Wno-macro-redefined'
# Dawn/Tint adds compiler flags that are ignored on Windows
build:windows --per_file_copt='external/dawn@-Wno-unknown-argument'
build:windows --host_per_file_copt='external/dawn@-Wno-unknown-argument'

# V8 now requires Windows 10, Bazel fails to set this properly.
build:windows --per_file_copt=external/v8/src/base/platform/platform-win32.cc@-D_WIN32_WINNT=0x0A00
build:windows --host_per_file_copt=external/v8/src/base/platform/platform-win32.cc@-D_WIN32_WINNT=0x0A00
Expand Down

0 comments on commit 17649ff

Please sign in to comment.