Skip to content

Commit

Permalink
Allow unused parameters in the stdlib build
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cramertj committed Jun 7, 2024
1 parent cea5f9f commit 4d6a526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions go/platform/apple.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ def apple_ensure_options(ctx, env, _tags, compiler_option_lists, linker_option_l
min_version = _apple_version_min(ctx, platform, platform_type)
for compiler_options in compiler_option_lists:
compiler_options.append(min_version)
compiler_options.append('-Wno-unused-parameter')
for linker_options in linker_option_lists:
linker_options.append(min_version)
2 changes: 2 additions & 0 deletions go/private/context.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ _COMPILER_OPTIONS_DENYLIST = dict({
# fmax-errors limits that and causes build failures.
"-fmax-errors=": None,
"-Wall": None,
"-Wunused-parameter": None,
"-Wextra": None,

# Symbols are needed by Go, so keep them
"-g0": None,
Expand Down

0 comments on commit 4d6a526

Please sign in to comment.