Skip to content

Commit 7cc576e

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

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# User-servicable parts:
1717
################################################################################
1818

19-
# C/C++ compiler -- clang also works
19+
# C/C++ compiler; to use Clang, build with `make CC=clang CXX=clang++`
2020
CXX ?= g++
2121
CC ?= gcc
2222

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,24 @@ Visit our [discussion forum](https://groups.google.com/forum/#!forum/jsonnet).
99

1010
## Building Jsonnet
1111

12-
The GCC C++ (g++) compiler is required to build Jsonnet. Clang is also
13-
supported.
12+
You can use either GCC or Clang to build Jsonnet. Note that on recent versions
13+
of macOS, `/usr/bin/gcc` and `/usr/bin/g++` are actually Clang, so there is no
14+
difference.
1415

1516
### Makefile
1617

17-
To build jsonnet with g++, run:
18+
To build Jsonnet with GCC, run:
1819

1920
```
2021
make
2122
```
2223

24+
To build Jsonnet with Clang, run:
25+
26+
```
27+
make CC=clang CXX=clang++
28+
```
29+
2330
To run the output binary, run:
2431

2532
```

0 commit comments

Comments
 (0)