Skip to content

Commit ce800d4

Browse files
mbrukmansparkprime
authored andcommitted
Add instructions for building with Bazel + Clang.
1 parent 7cc576e commit ce800d4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,24 @@ To run the output binary, run:
3737

3838
Bazel builds are also supported.
3939
[Install Bazel](https://www.bazel.io/versions/master/docs/install.html) if it is
40-
not installed already. Then, run the following command to build:
40+
not installed already. Then, run the following command to build with GCC:
4141

4242
```
4343
bazel build -c opt //cmd:jsonnet
4444
```
4545

46-
This builds the `jsonnet` target defined in [cmd/BUILD](./cmd/BUILD) To run the
47-
output binary, run:
46+
To build with Clang, use one of these two options:
47+
48+
```
49+
env CC=clang CXX=clang++ bazel build -c opt //cmd:jsonnet
50+
51+
# OR
52+
53+
bazel build -c opt --action_env=CC=clang --action_env=CXX=clang++ //cmd:jsonnet
54+
```
55+
56+
This builds the `jsonnet` target defined in [`cmd/BUILD`](./cmd/BUILD). To
57+
launch the output binary, run:
4858

4959
```
5060
bazel-bin/cmd/jsonnet

0 commit comments

Comments
 (0)