diff --git a/crosstool/cc_toolchain_config.bzl b/crosstool/cc_toolchain_config.bzl index ce7e66e..13b7c8e 100644 --- a/crosstool/cc_toolchain_config.bzl +++ b/crosstool/cc_toolchain_config.bzl @@ -422,6 +422,37 @@ def _impl(ctx): ], ) + objc_archive_action = action_config( + action_name = "objc-archive", + flag_sets = [ + flag_set( + flag_groups = [ + flag_group( + flags = _deterministic_libtool_flags(ctx) + [ + "-no_warning_for_no_symbols", + "-static", + "-filelist", + "%{obj_list_path}", + "-arch_only", + arch, + "-syslibroot", + "%{sdk_dir}", + "-o", + "%{output_execpath}", + ], + ), + ], + ), + ], + implies = ["apple_env"], + tools = [ + tool( + path = "libtool", + execution_requirements = xcode_execution_requirements, + ), + ], + ) + objc_executable_action = action_config( action_name = "objc-executable", flag_sets = [ @@ -629,6 +660,7 @@ def _impl(ctx): objcpp_compile_action, assemble_action, preprocess_assemble_action, + objc_archive_action, objc_executable_action, objcpp_executable_action, cpp_link_executable_action, @@ -1455,6 +1487,7 @@ 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, @@ -1668,6 +1701,7 @@ def _impl(ctx): "objc-compile", "objc++-compile", "objc-fully-link", + "objc-archive", "objc-executable", "objc++-executable", "assemble", @@ -1720,6 +1754,7 @@ def _impl(ctx): flag_set( actions = all_link_actions + [ ACTION_NAMES.cpp_link_static_library, + "objc-archive", ACTION_NAMES.objc_fully_link, ACTION_NAMES.objc_executable, ACTION_NAMES.objcpp_executable,