Skip to content

Commit

Permalink
Remove objc_archive from bazel toolchains
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 496384816
Change-Id: Iccb5331e7bf73291aa9bf26e2099d6f19d492fce
  • Loading branch information
googlewalt authored and hvadehra committed Feb 14, 2023
1 parent 17c0bd0 commit 3125f64
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 401 deletions.
Expand Up @@ -2352,369 +2352,6 @@ def _impl(ctx):
else:
objc_compile_action = None

if (ctx.attr.cpu == "x64_windows"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"<architecture>",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "<tool_dir>/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "ios_arm64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"arm64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "ios/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "tvos_arm64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"arm64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "tvos/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "ios_armv7"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"armv7",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "ios/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "watchos_armv7k"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"armv7k",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "watchos/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "watchos_arm64_32"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"arm64_32",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "watchos/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "ios_i386"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"i386",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "iossim/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "watchos_i386"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"i386",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "watchsim/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "watchos_x86_64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"x86_64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "watchsim/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "ios_x86_64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"x86_64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "iossim/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "darwin_x86_64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"x86_64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "mac/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
elif (ctx.attr.cpu == "tvos_x86_64"):
objc_archive_action = action_config(
action_name = "objc-archive",
flag_sets = [
flag_set(
flag_groups = [
flag_group(
flags = [
"-static",
"-filelist",
"%{obj_list_path}",
"-arch_only",
"x86_64",
"-syslibroot",
"%{sdk_dir}",
"-o",
"%{output_execpath}",
],
),
],
),
],
implies = ["apple_env"],
tools = [
tool(
path = "tvsim/libtool",
execution_requirements = xcode_execution_requirements,
),
],
)
else:
objc_archive_action = None

if (ctx.attr.cpu == "x64_windows"):
objcpp_compile_action = action_config(
action_name = ACTION_NAMES.objcpp_compile,
Expand Down Expand Up @@ -5917,7 +5554,6 @@ def _impl(ctx):
objcpp_compile_action,
assemble_action,
preprocess_assemble_action,
objc_archive_action,
objc_executable_action,
objcpp_executable_action,
cpp_link_executable_action,
Expand Down Expand Up @@ -7651,7 +7287,6 @@ def _impl(ctx):
"objc-compile",
"objc++-compile",
"objc-fully-link",
"objc-archive",
"objc-executable",
"objc++-executable",
"assemble",
Expand Down Expand Up @@ -7703,7 +7338,6 @@ def _impl(ctx):
ACTION_NAMES.preprocess_assemble,
ACTION_NAMES.objc_compile,
ACTION_NAMES.objcpp_compile,
"objc-archive",
"objc-fully-link",
ACTION_NAMES.cpp_link_executable,
ACTION_NAMES.cpp_link_dynamic_library,
Expand Down

0 comments on commit 3125f64

Please sign in to comment.