Skip to content

Commit 22c49c3

Browse files
cerisiercopybara-github
authored andcommitted
Pass -no_warning_for_no_symbols flag to libtool on macos
Copybara Import from #503 BEGIN_PUBLIC Pass -no_warning_for_no_symbols flag to libtool on macos (#503) This was the default in Bazel before Starlarkification. Closes #503 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=#503 from cerisier:no_warning_for_no_symbols cd9d7eb PiperOrigin-RevId: 824916957 Change-Id: I5e43216e89bfd5daae1b70336440dd678f549df7
1 parent 34d652e commit 22c49c3

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

cc/private/toolchain/unix_cc_toolchain_config.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,7 @@ def _impl(ctx):
13711371
flag_groups = [
13721372
flag_group(
13731373
flags = [
1374+
"-no_warning_for_no_symbols",
13741375
"-static",
13751376
"-o",
13761377
"%{output_execpath}",

cc/toolchains/args/archiver_flags/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ cc_args(
3838
name = "create_static_archive",
3939
actions = ["//cc/toolchains/actions:ar_actions"],
4040
args = select({
41-
":use_libtool_on_macos_setting": ["-static"],
41+
":use_libtool_on_macos_setting": [
42+
"-no_warning_for_no_symbols",
43+
"-static",
44+
],
4245
"//conditions:default": ["rcsD"],
4346
}),
4447
)

tests/rule_based_toolchain/legacy_features_as_args/goldens/macos/archiver_flags.textproto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ enabled: false
22
flag_sets {
33
actions: "c++-link-static-library"
44
flag_groups {
5+
flags: "-no_warning_for_no_symbols"
56
flags: "-static"
67
}
78
}

0 commit comments

Comments
 (0)