Skip to content

Commit

Permalink
cc_binary: remove extension when processing additional_link_outputs.
Browse files Browse the repository at this point in the history
This only applies to windows, where the `.exe` suffix will be removed.
This seems to me like a reasonable behaviour for windows devs.
  • Loading branch information
yuvalmo committed Jan 28, 2025
1 parent 44f47f4 commit 6da302d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/cc/cc_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def cc_binary_impl(ctx, additional_linkopts, force_linkstatic = False):
linker_inputs_extra, runtime_libraries_extra = extra_link_time_libraries.build_libraries(ctx = ctx, static_mode = linking_mode != linker_mode.LINKING_DYNAMIC, for_dynamic_library = _is_link_shared(ctx))

for suffix in cc_toolchain.additional_link_outputs:
outfile = ctx.actions.declare_file(binary.basename + suffix, sibling = binary)
outfile = ctx.actions.declare_file(_strip_extension(binary) + suffix, sibling = binary)
additional_linker_outputs.append(outfile)

cc_linking_outputs_binary, cc_launcher_info, deps_cc_linking_context = _create_transitive_linking_actions(
Expand Down

0 comments on commit 6da302d

Please sign in to comment.