@@ -33,15 +33,31 @@ for adding this configuration.
33
33
[ bazelisk] ( https://github.com/bazelbuild/bazelisk ) which automates
34
34
downloading the proper bazel version
35
35
3 . ` cd utils/bazel `
36
- 4 . ` bazel build --config=generic_clang @llvm-project//... `
37
- * If you're using clang, it's expected that lld is also available
38
- * If you're using MSVC or gcc, instead of ` --config=generic_clang ` , pass
39
- ` --config=generic_gcc ` or ` --config=msvc `
40
- * To specify a specific local compiler to use, add the following bazel
41
- flag: ` --repo_env=CC=/usr/bin/clang `
42
- * ` --config=generic_clang ` /` --config=generic_gcc ` by default set
43
- ` --repo_env=CC=clang ` /` --repo_env=CC=gcc ` , using ` clang ` /` gcc ` on the
44
- ` PATH `
36
+ 4 . The ` bazel build ` command depends on the local compiler you want to use.
37
+ * For ** clang** , go to step 5.
38
+ * For ** gcc** or ** MSVC** , go to step 6
39
+ 5 . If you are using ** clang** , it is expected that lld is also available.
40
+ The ` --config=generic_clang ` flag by default sets the compiler to be ` clang `
41
+ binary on the ` PATH ` .
42
+ ```
43
+ bazel build --config=generic_clang @llvm-project//...
44
+ ```
45
+ To provide a specific path to your ` clang ` , use the ` --repo_env ` Bazel flag.
46
+ For example:
47
+ ```
48
+ bazel build --config=generic_clang --repo_env=CC=/usr/bin/clang --repo_env=CXX=/usr/bin/clang++ @llvm-project//...
49
+ ```
50
+ 6 . If you are using ** gcc** or ** MSVC** , instead of ` --config=generic_clang `
51
+ , pass ` --config=generic_gcc ` or ` --config=generic_msvc ` , which sets the
52
+ compiler to be ` gcc ` binary on the ` PATH ` .
53
+ ```
54
+ bazel build --config=generic_gcc @llvm-project//...
55
+ ```
56
+ To provide a specific path to your ` gcc ` , use the ` --repo_env ` Bazel flag.
57
+ For example:
58
+ ```
59
+ bazel build --config=generic_gcc --repo_env=CC=/usr/bin/gcc --repo_env=CXX=/usr/bin/g++ @llvm-project//...
60
+ ```
45
61
46
62
# Configuration
47
63
0 commit comments