I have cross compilation set up in my bazel project to allow building with multiple separate toolchains (currently x86-64 and cross compilation for aarch64). As I understand it, protobuf officially supports aarch64. However, compilation of
@com_google_protobuf//:protobuf_python fails when my cross-compiled toolchain is selected. Is there a proper way to handle this? I would like to build either the correct protoc for this cross compilation, or if that's not possible, disable the toolchain for just this target (so that the protoc for this platform can be used).
I currently select the toolchain with something like this in my .bazelrc:
build:cross --crosstool_top=//toolchains:cross
build:cross --cpu=arm
build:cross --force_pic=true
The errors I get come from the linker thinking that all the symbols are undefined (even std library symbols).