Skip to content

Commit

Permalink
Fix Bazel 8 crash when generating dsym or linkmap paths (#2651)
Browse files Browse the repository at this point in the history
Fixes the crash described in
bazelbuild/bazel#24625 (comment)
  • Loading branch information
jpsim authored Feb 18, 2025
1 parent be89110 commit a5f5b48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apple/internal/linking_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

"""Support for linking related actions."""

load(
"@bazel_skylib//lib:paths.bzl",
"paths",
)
load("@build_bazel_apple_support//lib:lipo.bzl", "lipo")
load(
"//apple/internal:cc_toolchain_info_support.bzl",
Expand Down Expand Up @@ -276,7 +280,7 @@ def _link_multi_arch_binary(
else:
suffix = "_bin.dwarf"
dsym_binary = ctx.actions.declare_shareable_artifact(
ctx.label.package + "/" + ctx.label.name + suffix,
paths.join(ctx.label.package, ctx.label.name + suffix),
child_config.bin_dir,
)
extensions["dsym_path"] = dsym_binary.path # dsym symbol file
Expand All @@ -286,7 +290,7 @@ def _link_multi_arch_binary(
linkmap = None
if ctx.fragments.cpp.objc_generate_linkmap:
linkmap = ctx.actions.declare_shareable_artifact(
ctx.label.package + "/" + ctx.label.name + ".linkmap",
paths.join(ctx.label.package, ctx.label.name + ".linkmap"),
child_config.bin_dir,
)
extensions["linkmap_exec_path"] = linkmap.path # linkmap file
Expand Down

0 comments on commit a5f5b48

Please sign in to comment.