Skip to content

Commit

Permalink
Suppress warnings from external repositories if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
phst committed Apr 17, 2024
1 parent 1829af7 commit 81181e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021, 2022, 2023 Google LLC
# Copyright 2021, 2022, 2023, 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,6 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

common --enable_platform_specific_config

# Suppress warnings from external repositories if possible.
build --features=external_include_paths
build --host_features=external_include_paths

# FIXME: This shouldn’t be necessary. File bug against Bazel.
build:windows --copt='/external:W3' --host_copt='/external:W3'

# Run Pylint by default.
build --aspects='//private:defs.bzl%check_python'
build --output_groups='+check_python'
Expand Down
2 changes: 1 addition & 1 deletion emacs/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ def _install(ctx, cc_toolchain, readme):

def _munge_msvc_flag(s):
# Crude way to work around specifying Visual C++ options in .bazelrc.
return s.replace("/std:c", "-std=gnu")
return None if s.startswith("/external:") else s.replace("/std:c", "-std=gnu")

0 comments on commit 81181e6

Please sign in to comment.