Files
carbon-lang/toolchain/install/bazel/install.MODULE.bazel
T
b0ffed7c3e Make the Carbon toolchain a viable Bazel module exposing cc_toolchains (#6652)
This let's you point Bazel at an installed toolchain or download one of
our release archives. When you do, it will configure itself as a C++
Bazel toolchain. This toolchain works reasonably well, but doesn't cache
the C++ runtimes, and so linking is inefficient. The next step will be
to pivot the runtimes from the implicitly on-demand (which can't cache
when using a sandboxed build system like Bazel) to _explicit_ on-demand
runtimes directly with Bazel support.

I've included an example Bazel project that uses this and provides a
bunch of documentation and an example script that should let folks try
this out easily.

---------

Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: David Blaikie <dblaikie@gmail.com>
2026-01-28 02:45:19 +00:00

24 lines
819 B
Plaintext

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Carbon toolchain Bazel module.
This module exposes Bazel `cc_toolchain`s built from this Carbon toolchain.
Add the repository to your `MODULES.bazel` and then use
`register_toolchains("@carbon_toolchain//:all")` to get these toolchains. For
more detailed examples, see the Carbon project examples in examples/bazel
"""
module(name = "carbon_toolchain")
bazel_dep(name = "rules_cc", version = "0.1.4")
bazel_dep(name = "platforms", version = "1.0.0")
carbon_toolchain_config = use_extension(
"//bazel:carbon_toolchain.bzl",
"carbon_toolchain_config",
)
use_repo(carbon_toolchain_config, "carbon_toolchain_config")