Skip to content

Commit 4d6a526

Browse files
committed
Allow unused parameters in the stdlib build
Previously, the stdlib would fail to build if the C toolchain enabled -Werror/-Wextra/-Wunused-parameter since it has unused parameters. This change removes those flags when building the stdlib.
1 parent cea5f9f commit 4d6a526

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

go/platform/apple.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ def apple_ensure_options(ctx, env, _tags, compiler_option_lists, linker_option_l
4444
min_version = _apple_version_min(ctx, platform, platform_type)
4545
for compiler_options in compiler_option_lists:
4646
compiler_options.append(min_version)
47+
compiler_options.append('-Wno-unused-parameter')
4748
for linker_options in linker_option_lists:
4849
linker_options.append(min_version)

go/private/context.bzl

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ _COMPILER_OPTIONS_DENYLIST = dict({
9696
# fmax-errors limits that and causes build failures.
9797
"-fmax-errors=": None,
9898
"-Wall": None,
99+
"-Wunused-parameter": None,
100+
"-Wextra": None,
99101

100102
# Symbols are needed by Go, so keep them
101103
"-g0": None,

0 commit comments

Comments
 (0)