Skip to content

Commit

Permalink
Remove support for handling bitcode symbol maps from rules_apple.
Browse files Browse the repository at this point in the history
Bitcode is no longer supported for Xcode 14 and later. App Store support for uploads from Xcode prior to 14.1 will no longer be allowed after April 25.

PiperOrigin-RevId: 527298659
  • Loading branch information
nglevin authored and swiple-rules-gardener committed Apr 26, 2023
1 parent 5c4f006 commit b31a1cb
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 316 deletions.
1 change: 0 additions & 1 deletion apple/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ bzl_library(
"//apple/internal/partials:apple_bundle_info",
"//apple/internal/partials:apple_symbols_file",
"//apple/internal/partials:binary",
"//apple/internal/partials:bitcode_symbols",
"//apple/internal/partials:clang_rt_dylibs",
"//apple/internal/partials:codesigning_dossier",
"//apple/internal/partials:debug_symbols",
Expand Down
42 changes: 0 additions & 42 deletions apple/internal/ios_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ def _ios_application_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = embeddable_targets,
label_name = label.name,
package_bitcode = True,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -570,15 +561,6 @@ def _ios_app_clip_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = embeddable_targets,
label_name = label.name,
package_bitcode = True,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -843,14 +825,6 @@ def _ios_framework_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.frameworks,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -1093,14 +1067,6 @@ def _ios_extension_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.frameworks,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -1661,14 +1627,6 @@ def _ios_imessage_extension_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.frameworks,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down
10 changes: 2 additions & 8 deletions apple/internal/linking_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,19 @@ def _debug_outputs_by_architecture(link_outputs):
Returns:
A `struct` containing three fields:
* `bitcode_symbol_maps`: A mapping of architectures to Files representing bitcode symbol
maps for each architecture.
* `dsym_binaries`: A mapping of architectures to Files representing dSYM binary outputs
for each architecture.
* `linkmaps`: A mapping of architectures to Files representing linkmaps for each
architecture.
"""
bitcode_symbol_maps = {}
dsym_binaries = {}
linkmaps = {}

for link_output in link_outputs:
bitcode_symbol_maps[link_output.architecture] = link_output.bitcode_symbols
dsym_binaries[link_output.architecture] = link_output.dsym_binary
linkmaps[link_output.architecture] = link_output.linkmap

return struct(
bitcode_symbol_maps = bitcode_symbol_maps,
dsym_binaries = dsym_binaries,
linkmaps = linkmaps,
)
Expand Down Expand Up @@ -312,10 +307,9 @@ def _link_multi_arch_binary(
with minimal support for linking multiple architecture binaries from split dependencies.
Specifically, this lacks support for:
- Generating Apple DSYMs binaries.
- Generating Apple bitcode symbols.
- Generating Apple dSYM binaries.
- Generating Objective-C linkmaps.
- Avoid linking Objective-C(++) dependencies symbols (ie. avoid_deps).
- Avoid linking symbols from Objective-C(++) dependencies (i.e. avoid_deps).
Args:
actions: The actions provider from `ctx.actions`.
Expand Down
5 changes: 0 additions & 5 deletions apple/internal/partials.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ load(
"@build_bazel_rules_apple//apple/internal/partials:binary.bzl",
_binary_partial = "binary_partial",
)
load(
"@build_bazel_rules_apple//apple/internal/partials:bitcode_symbols.bzl",
_bitcode_symbols_partial = "bitcode_symbols_partial",
)
load(
"@build_bazel_rules_apple//apple/internal/partials:clang_rt_dylibs.bzl",
_clang_rt_dylibs_partial = "clang_rt_dylibs_partial",
Expand Down Expand Up @@ -117,7 +113,6 @@ partials = struct(
app_intents_metadata_bundle_partial = _app_intents_metadata_bundle_partial,
apple_bundle_info_partial = _apple_bundle_info_partial,
binary_partial = _binary_partial,
bitcode_symbols_partial = _bitcode_symbols_partial,
clang_rt_dylibs_partial = _clang_rt_dylibs_partial,
codesigning_dossier_partial = _codesigning_dossier_partial,
debug_symbols_partial = _debug_symbols_partial,
Expand Down
14 changes: 0 additions & 14 deletions apple/internal/partials/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,6 @@ bzl_library(
],
)

bzl_library(
name = "bitcode_symbols",
srcs = ["bitcode_symbols.bzl"],
visibility = [
"//apple/internal:__pkg__",
],
deps = [
"//apple/internal:intermediates",
"//apple/internal:processor",
"@bazel_skylib//lib:partial",
"@build_bazel_apple_support//lib:apple_support",
],
)

bzl_library(
name = "clang_rt_dylibs",
srcs = ["clang_rt_dylibs.bzl"],
Expand Down
159 changes: 0 additions & 159 deletions apple/internal/partials/bitcode_symbols.bzl

This file was deleted.

25 changes: 0 additions & 25 deletions apple/internal/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ def _tvos_application_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = embeddable_targets,
label_name = label.name,
package_bitcode = True,
platform_prerequisites = platform_prerequisites,
),
partials.clang_rt_dylibs_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -506,14 +497,6 @@ def _tvos_framework_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.frameworks,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
# TODO(kaipi): Check if clang_rt dylibs are needed in Frameworks, or if
# the can be skipped.
partials.clang_rt_dylibs_partial(
Expand Down Expand Up @@ -739,14 +722,6 @@ def _tvos_extension_impl(ctx):
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.frameworks,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.clang_rt_dylibs_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down
14 changes: 0 additions & 14 deletions apple/internal/watchos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ reproducible error case.".format(
bundle_name = bundle_name,
label_name = label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
dependency_targets = [ctx.attr.extension],
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.codesigning_dossier_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down Expand Up @@ -493,14 +487,6 @@ def _watchos_extension_impl(ctx):
bundle_name = bundle_name,
label_name = ctx.label.name,
),
partials.bitcode_symbols_partial(
actions = actions,
binary_artifact = binary_artifact,
bitcode_symbol_maps = debug_outputs.bitcode_symbol_maps,
dependency_targets = ctx.attr.extensions,
label_name = label.name,
platform_prerequisites = platform_prerequisites,
),
partials.clang_rt_dylibs_partial(
actions = actions,
apple_mac_toolchain_info = apple_mac_toolchain_info,
Expand Down
Loading

1 comment on commit b31a1cb

@keith
Copy link
Member

@keith keith commented on b31a1cb May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.