mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-28 08:43:26 +00:00
Configure STRIP tool for meson
This commit is contained in:
parent
3c433ddfd4
commit
95a78839cd
|
@ -81,6 +81,8 @@ def _create_meson_script(configureParameters):
|
|||
script.append("##export_var## CXX {}".format(_absolutize(ctx.workspace_name, tools.cxx)))
|
||||
if " " not in tools.cxx_linker_static:
|
||||
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)))
|
||||
|
||||
# set flags same as foreign_cc/private/cc_toolchain_util.bzl
|
||||
# cannot use get_flags_info() because bazel adds additional flags that
|
||||
|
|
|
@ -22,6 +22,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",
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -218,6 +219,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):
|
||||
|
|
Loading…
Reference in a new issue