Utilizing Bazel for Cross-Platform and Cross-Architecture Compilation an... Axel Uhlig & Marcel Kost

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024
  • Utilizing Bazel for Cross-Platform and Cross-Architecture Compilation and Testing - Axel Uhlig & Marcel Kost, Salesforce
    We want to demonstrate how to use Bazel to compile C++ source code across various operating systems (e.g. Linux, Windows, and macOS) and processor architectures (e.g. AMD and ARM). We will show how to - Create a Bazel C++ toolchain, that serves different host and target operating systems and architectures - Make Bazel automatically pick the right toolchain configuration based on host and target system - Compile natively as well as cross platform - Create “universal binaries” by running several toolchains in the same build, creating a single artifact, that can run on multiple architectures - Use the platform information to name packages, switch dependencies, skip targets, … We will show how to achieve all of this by using native Bazel features like multi platform builds, toolchains, transitions, and sufficiently hermetic toolchains.

Комментарии •