Skip to content

Commit 0f9912b

Browse files
ShreeM01keith
andauthored
Add -dead_strip in default opt link flags for darwin (#17312)
This is similar to the `--gc-sections` addition here. `-dead_strip` is supported on all versions of ld64 we care about. Closes #16770. PiperOrigin-RevId: 501557438 Change-Id: Ia5e1e94305361f10f1b20654d83edb76126b3056 Co-authored-by: Keith Smiley <[email protected]>
1 parent 17ac479 commit 0f9912b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/cpp/unix_cc_configure.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
617617
],
618618
),
619619
"%{opt_link_flags}": get_starlark_list(
620-
[] if darwin else _add_linker_option_if_supported(
620+
["-Wl,-dead_strip"] if darwin else _add_linker_option_if_supported(
621621
repository_ctx,
622622
cc,
623623
"-Wl,--gc-sections",

0 commit comments

Comments
 (0)