how to self-define a cross compile tool chain for envoy ?

24 views
Skip to first unread message

fansh...@126.com

unread,
Dec 6, 2023, 3:36:19 AM12/6/23
to envoy-dev
As title, do we have any guide, or the community can provide some steps to describe how to set up a cross build tool chain for envoy? or some one can help ?

What we have done :
1.add a cc_toolchain_config.bzl to contain our self gcc toolchain configuration.
2.then we add a BUILD file for cc_toolchain config
cc_toolchain_config(name = "fsmr4_32_toolchain_config")

cc_toolchain(
    name = "arm_32_toolchain",
    toolchain_identifier = "arm-32-toolchain",
    toolchain_config = ":arm_32_toolchain_config",
    all_files = ":all_files",
    compiler_files = ":all_files",
    dwp_files = ":empty",
    linker_files = ":all_files",
    objcopy_files = ":empty",
    strip_files = ":empty",
)

cc_toolchain_suite(
    name = "arm_gcc_toolchain",
    toolchains = {
        "arm32": ":arm_32_toolchain",
        "k8": ":arm_32_toolchain",

    },
    tags = ["manual"]
)
3.we using the bazel build with
--config=gcc
--crosstool_top=//third_party/toolchains/arm_toolchains/arm32-axm:arm_32_toolchain
--cpu=arm32 \

but seems bazel still using local k8 toolchain to do some lib compile
Reply all
Reply to author
Forward
0 new messages