diff --git a/src/main/starlark/builtins_bzl/common/cc/link/cpp_link_action.bzl b/src/main/starlark/builtins_bzl/common/cc/link/cpp_link_action.bzl index 97be0fadcd5158..efe4ff41ca733f 100644 --- a/src/main/starlark/builtins_bzl/common/cc/link/cpp_link_action.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/link/cpp_link_action.bzl @@ -16,7 +16,7 @@ load(":common/cc/cc_helper_internal.bzl", "artifact_category") load(":common/cc/link/finalize_link_action.bzl", "finalize_link_action") load(":common/cc/link/link_build_variables.bzl", "setup_linking_variables") -load(":common/cc/link/target_types.bzl", "USE_ARCHIVER", "USE_LINKER", "is_dynamic_library") +load(":common/cc/link/target_types.bzl", "LINK_TARGET_TYPE", "USE_ARCHIVER", "USE_LINKER", "is_dynamic_library") load(":common/paths.bzl", "paths") cc_common_internal = _builtins.internal.cc_common @@ -200,7 +200,7 @@ def link_action( cc_internal.dynamic_library_soname( actions, output.short_path, - link_type != NODEPS_DYNAMIC_LIBRARY, + link_type != LINK_TARGET_TYPE.NODEPS_DYNAMIC_LIBRARY, ), interface_output.path if interface_output else None, thinlto_param_file.path if thinlto_param_file else None, diff --git a/src/main/starlark/builtins_bzl/common/cc/link/finalize_link_action.bzl b/src/main/starlark/builtins_bzl/common/cc/link/finalize_link_action.bzl index 845154987a455b..3a980f648b2b2b 100644 --- a/src/main/starlark/builtins_bzl/common/cc/link/finalize_link_action.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/link/finalize_link_action.bzl @@ -264,6 +264,7 @@ def finalize_link_action( action_outputs, progress_message, link_type, + interface_output, ) def _create_action( @@ -277,7 +278,8 @@ def _create_action( inputs, outputs, progress_message, - link_type): + link_type, + interface_output): """ Creates C++ linking or LTO indexing action. @@ -296,7 +298,12 @@ def _create_action( """ parameter_file_type = None - if _can_split_command_line(link_type, cc_toolchain, feature_configuration): + if _can_split_command_line( + link_type, + cc_toolchain, + feature_configuration, + interface_output, + ): if feature_configuration.is_enabled("gcc_quoting_for_param_files"): parameter_file_type = "GCC_QUOTED" elif feature_configuration.is_enabled("windows_quoting_for_param_files"): @@ -352,7 +359,11 @@ def _create_action( exec_group = exec_group, ) -def _can_split_command_line(link_type, cc_toolchain, feature_configuration): +def _can_split_command_line( + link_type, + cc_toolchain, + feature_configuration, + interface_output): if not cc_toolchain._supports_param_files: return False elif is_dynamic_library(link_type):