Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.1.0] Fix -fatal_warnings on macOS #21018

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/cpp/unix_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""A Starlark cc_toolchain configuration rule"""

load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
load(
"@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
"action_config",
Expand All @@ -29,7 +30,6 @@ load(
"variable_with_value",
"with_feature_set",
)
load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")

def _target_os_version(ctx):
platform_type = ctx.fragments.apple.single_arch_platform.platform_type
Expand Down Expand Up @@ -1286,7 +1286,9 @@ def _impl(ctx):
),
flag_set(
actions = all_link_actions,
flag_groups = [flag_group(flags = ["-Wl,-fatal-warnings"])],
flag_groups = [flag_group(
flags = ["-Wl,-fatal-warnings"] if is_linux else ["-Wl,-fatal_warnings"],
)],
),
],
)
Expand Down
Loading