Skip to content

Commit f66ad5f

Browse files
committed
Disable interface library -soname if already passed
The default toolchain already passes a linker flag for `-soname` which results in a different soname than the one being computed here. The one from the toolchain is correct, so if that's already being passed, we don't need to pass this one. This is probably a good path to removing this one off logic entirely.
1 parent 128cf88 commit f66ad5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cc/private/link/cc_linking_helper.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _create_dynamic_link_actions(
298298
so_interface, _ = _get_linked_artifact(actions, name, LINK_TARGET_TYPE.INTERFACE_DYNAMIC_LIBRARY, cc_toolchain, link_artifact_name_suffix)
299299

300300
# TODO(b/28946988): Remove this hard-coded flag.
301-
if not feature_configuration.is_enabled("targets_windows"):
301+
if not feature_configuration.is_enabled("targets_windows") and not feature_configuration.is_enabled("set_soname"):
302302
link_action_kwargs["linkopts"].append("-Wl,-soname=" + _cc_internal.dynamic_library_soname(
303303
actions,
304304
linker_output.short_path,

0 commit comments

Comments
 (0)