Skip to content

Commit 589c633

Browse files
authored
Update build guide for cling (root-project#15972)
1 parent 5838526 commit 589c633

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

interpreter/cling/README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The main repository is at [https://github.com/root-project/cling](https://github
77
Overview
88
--------
99
Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler
10-
infrastructure. Cling realizes the [read-eval-print loop
10+
infrastructure. Cling implements the [read-eval-print loop
1111
(REPL)](http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)
1212
concept, in order to leverage rapid application development. Implemented as a
1313
small extension to LLVM and Clang, the interpreter reuses their strengths such
@@ -33,35 +33,38 @@ See our [release notes](docs/ReleaseNotes.md) to find what's new.
3333

3434

3535
### Binaries
36-
Our nightly binary snapshots can be found
37-
[here](https://root.cern.ch/download/cling/).
36+
Our nightly binary snapshots are currently unavailable.
3837

3938

4039
### Building from Source
4140

42-
```sh
41+
```bash
4342
git clone https://github.com/root-project/llvm-project.git
4443
cd llvm-project
4544
git checkout cling-latest
46-
cd ../
47-
git clone <cling>
45+
cd ..
46+
git clone https://github.com/root-project/cling.git
4847
mkdir cling-build && cd cling-build
49-
cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;nvptx" ../llvm-project/llvm
48+
cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm
49+
cmake --build . --target cling
5050
```
5151

52+
See also the instructions [on the webpage](https://root.cern/cling/cling_build_instructions/).
53+
5254
Usage
5355
-----
54-
```c++
55-
./cling '#include <stdio.h>' 'printf("Hello World!\n")'
56+
Assuming we're in the build folder:
57+
```bash
58+
./bin/cling '#include <stdio.h>' 'printf("Hello World!\n")'
5659
```
5760

5861
To get started run:
5962
```bash
60-
./cling --help
63+
./bin/cling --help
6164
```
62-
or type
63-
```
64-
./cling
65+
or
66+
```bash
67+
./bin/cling
6568
[cling]$ .help
6669
```
6770

0 commit comments

Comments
 (0)