diff --git a/foreign_cc/meson.bzl b/foreign_cc/meson.bzl index e21cfc954..4e138f199 100644 --- a/foreign_cc/meson.bzl +++ b/foreign_cc/meson.bzl @@ -81,6 +81,10 @@ def _create_meson_script(configureParameters): script.append("##export_var## CC {}".format(_absolutize(ctx.workspace_name, tools.cc))) if " " not in tools.cxx: script.append("##export_var## CXX {}".format(_absolutize(ctx.workspace_name, tools.cxx))) + if " " not in tools.cxx_linker_static and tools.cxx_linker_static.endswith("ar"): + script.append("##export_var## AR {}".format(_absolutize(ctx.workspace_name, tools.cxx_linker_static))) + if tools.strip and " " not in tools.strip: + script.append("##export_var## STRIP {}".format(_absolutize(ctx.workspace_name, tools.strip))) copts = flags.cc cxxopts = flags.cxx diff --git a/foreign_cc/private/cc_toolchain_util.bzl b/foreign_cc/private/cc_toolchain_util.bzl index afe6024fe..22cd41876 100644 --- a/foreign_cc/private/cc_toolchain_util.bzl +++ b/foreign_cc/private/cc_toolchain_util.bzl @@ -23,6 +23,7 @@ CxxToolsInfo = provider( cxx_linker_static = "C++ linker to link static library", cxx_linker_executable = "C++ linker to link executable", ld = "linker", + strip = "Binary symbol stripper", ), ) @@ -219,6 +220,13 @@ def get_tools_info(ctx): action_name = ACTION_NAMES.cpp_link_executable, ), ld = cc_toolchain.ld_executable, + strip = cc_common.get_tool_for_action( + feature_configuration = feature_configuration, + action_name = ACTION_NAMES.strip, + ) if cc_common.action_is_enabled( + feature_configuration = feature_configuration, + action_name = ACTION_NAMES.strip, + ) else "", ) def get_flags_info(ctx, link_output_file = None):