Scaling number of supported platforms. Cross compilation of the rust code with bazel. Part 5
This is the 5th part of Basel cross-compilation series. Previous posts: What? Do I really need to configure C++ compiler to compile rust? Compilation from macOS(Intel) to linux x86_64 finaly works. Cross compilation for ARM v7. Fetching toolchains at build time. All the build files in the previous steps looked pretty much the same, the only differences were: URLs exec architecture target architecture some compiler flags (like paths) Of cause we don't want to support a separate build file for every host and target combination. The way around it maybe to generate it from the template. The easiest way would be to use string formatting int the *.bzl file. So we create `toolchains/cpp_toolchains.bzl`, and store the BUILD file content in the variable there: BUILD_FILE_TEMPLATE = """ load("@bazel_tools//tools/cpp:unix_cc_toolchain_config.bzl", "cc_toolchain_config") load...