[PATCH] D155004: [bazel][docs] Update build documentation

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 13:36:52 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4cca3de87e86: [bazel][docs] Update build documentation (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155004/new/

https://reviews.llvm.org/D155004

Files:
  utils/bazel/README.md


Index: utils/bazel/README.md
===================================================================
--- utils/bazel/README.md
+++ utils/bazel/README.md
@@ -29,11 +29,19 @@
 2. Install Bazel at the version indicated by [.bazelversion](./.bazelversion),
    following the official instructions, if you don't have it installed yet:
    https://docs.bazel.build/versions/main/install.html.
+   * You can also install and use
+     [bazelisk](https://github.com/bazelbuild/bazelisk) which automates
+     downloading the proper bazel version
 3. `cd utils/bazel`
-4. `bazel build --config=generic_clang @llvm-project//...` (if building on Unix
-   with Clang/LLD). `--config=generic_gcc` and `--config=msvc` are also
-   available.
-
+4. `bazel build --config=generic_clang @llvm-project//...`
+   * If you're using clang, it's expected that lld is also available
+   * If you're using MSVC or gcc, instead of `--config=generic_clang`, pass
+   `--config=generic_gcc` or `--config=msvc`
+   * To specify a specific local compiler to use, add the following bazel
+     flag: `--repo_env=CC=/usr/bin/clang`
+     * `--config=generic_clang`/`--config=generic_gcc` by default set
+       `--repo_env=CC=clang`/`--repo_env=CC=gcc`, using `clang`/`gcc` on the
+       `PATH`
 
 # Configuration
 
@@ -66,12 +74,6 @@
 Bear in mind that this requires that your ramdisk is of sufficient size to hold
 any temporary files. Anecdotally, 1GB should be sufficient.
 
-To specify a specific local compiler to use, add the following bazel flag:
-
-```.bazelrc
-build --repo_env=CC=$PATH_TO_CC
-```
-
 # Coverage
 
 The LLVM, MLIR, and Clang subprojects have configurations for Linux (Clang and


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155004.539277.patch
Type: text/x-patch
Size: 1670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230711/7370c30c/attachment.bin>


More information about the llvm-commits mailing list