【Bazel 】- Examples to build C++ code

Examples to build C++ code

This folder is part of the C++ Bazel Tutorial, found at https://bazel.build/start/cpp

This package will showcase how to build C++ code in stages.
此文件夹是 C++ Bazel 教程的一部分,位于 https://bazel.build/start/cpp

此包将展示如何分阶段构建 C++ 代码。

Stage 0

The zeroth stage shows how to setup the toolchain so that Bazel doesn’t use the system’s C++ gcc toolchain.
This provides hermeticity, making the build more portable and reproducible on other computers.

Note, this is for Linux only. MacOS and Windows still use the system gcc.
第零阶段展示了如何设置工具链,以便 Bazel 不使用系统的 C++ gcc 工具链。
这提供了密封性,使构建在其他计算机上更具可移植性和可重复性。

注意,这仅适用于 Linux。MacOS 和 Windows 仍然使用系统 gcc。

Stage 1

The first stage is really simple and shows you how to compile a binary with a single source file.
第一阶段非常简单,向您展示如何使用单个源文件编译二进制文件。

Stage 2

The second stage will showcase how to build an application with multiple source and header files, separated in a library and a binary.
第二阶段将展示如何构建具有多个源文件和头文件的应用程序(分为库和二进制文件)。

Stage 3

The third stage showcases how to link multiple build directories by building multiple libraries in different packages and then connecting it up with the main application.
第三阶段展示了如何通过在不同的包中构建多个库来链接多个构建目录,然后将其与主应用程序连接起来。

相关推荐

  1. Bazel离线编译SPU

    2024-06-17 10:28:03       31 阅读
  2. babel.min.js -1

    2024-06-17 10:28:03       33 阅读
  3. 前端|babel升级

    2024-06-17 10:28:03       34 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-17 10:28:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-17 10:28:03       101 阅读
  3. 在Django里面运行非项目文件

    2024-06-17 10:28:03       82 阅读
  4. Python语言-面向对象

    2024-06-17 10:28:03       91 阅读

热门阅读

  1. CSDN快速获取积分的方法

    2024-06-17 10:28:03       25 阅读
  2. 一句话让AI帮你创建完美的测试用例

    2024-06-17 10:28:03       34 阅读
  3. JC/T 2653-2022 不发火砂浆检测

    2024-06-17 10:28:03       24 阅读
  4. diffuser格式与ckpt格式说明

    2024-06-17 10:28:03       31 阅读
  5. 程序员做电子书产品变现的复盘(4)

    2024-06-17 10:28:03       32 阅读
  6. 5.3.1_3 由遍历序列构造二叉树

    2024-06-17 10:28:03       27 阅读
  7. tapir_速读

    2024-06-17 10:28:03       29 阅读
  8. CRC8校验算法源码——C语言版

    2024-06-17 10:28:03       34 阅读
  9. cmake target_link_libraries 详解

    2024-06-17 10:28:03       27 阅读