Setup
This guide explains how to set up rules_ll. If you just plan on using the
rules_cc compatible remote execution setup you still need to follow this
guide.
System requirements
rules_ll makes heavy use of upstream dependencies. Staying upstream
sometimes means that backwards-incompatible changes make it into rules_ll
faster than into other toolchains. Because of this rules_ll won't work on
some older systems.
Prerequisites:
- An
x86_64processor. You can verify this withuname -a. - A Linux kernel with 64-bit support. You can verify this with
getconf LONG_BIT. - As a rough guideline, at least 10 GB of disk space for fetched
dependencies and build artifacts. Using all toolchains, debug and
optimization modes might require more than 30 GB of disk space. If the
build cache gets too large over time you can reset it using the
bazel cleanandbazel clean --expungecommands. - As a rough guideline, at least 1 GB of Memory per CPU core. The
nproccommand prints the number of CPU cores available to your environment.
-
Install the nix package manager and enable flakes.
-
Create a
rules_llcompatible workspace. To keep the development shell in sync with therules_llBazel module, pin the flake to a specific version:git init nix flake init -t github:eomii/rules_ll/<version>The default toolchains include C++ and HIP for AMDGPU. If you want to target NVPTX devices (Nvidia GPUs), make sure to read the CUDA license and set
unfree = trueinflake.nix.See tags to find the most recent version.
-
Enter a
rules_lldevelopment shell:nix develop -
Consider setting up at least a local remote cache as described in the remote execution guide.
See rules_ll/examples
for examples. The Guides explain more advanced
features of rules_ll such as Clang-Tidy, C++ modules, and heterogeneous
programming.