Skip to content

Commit

Permalink
Remove bitcode support (#1534)
Browse files Browse the repository at this point in the history
Now that Xcode 14.1 is the minimum supported to the App Store, and Xcode
14.0 dropped support for bitcode, we don't need to handle these flags
anymore.

Closes #1956
  • Loading branch information
keith authored May 5, 2023
1 parent 796fae6 commit 5b7c929
Show file tree
Hide file tree
Showing 24 changed files with 9 additions and 662 deletions.
1 change: 0 additions & 1 deletion apple/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,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
50 changes: 0 additions & 50 deletions apple/internal/ios_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,6 @@ def _ios_application_impl(ctx):
executable_name = executable_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 @@ -520,15 +511,6 @@ def _ios_app_clip_impl(ctx):
executable_name = executable_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 @@ -781,14 +763,6 @@ def _ios_framework_impl(ctx):
executable_name = executable_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 @@ -1016,14 +990,6 @@ def _ios_extension_impl(ctx):
executable_name = executable_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 @@ -1267,14 +1233,6 @@ def _ios_dynamic_framework_impl(ctx):
executable_name = executable_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 @@ -1817,14 +1775,6 @@ def _ios_imessage_extension_impl(ctx):
executable_name = executable_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 @@ -34,24 +34,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 @@ -306,10 +301,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 @@ -30,10 +30,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 @@ -111,7 +107,6 @@ partials = struct(
app_assets_validation_partial = _app_assets_validation_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 @@ -61,20 +61,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
157 changes: 0 additions & 157 deletions apple/internal/partials/bitcode_symbols.bzl

This file was deleted.

33 changes: 0 additions & 33 deletions apple/internal/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,6 @@ def _tvos_application_impl(ctx):
executable_name = executable_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 @@ -483,14 +474,6 @@ def _tvos_dynamic_framework_impl(ctx):
executable_name = executable_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 @@ -730,14 +713,6 @@ def _tvos_framework_impl(ctx):
executable_name = executable_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 @@ -951,14 +926,6 @@ def _tvos_extension_impl(ctx):
executable_name = executable_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
Loading

0 comments on commit 5b7c929

Please sign in to comment.