Skip to content

Commit fc8a51e

Browse files
committed
README: enhance plain text readability
this file is first and foremost plain text, and rendered markdown second.
1 parent 2e328be commit fc8a51e

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A general-purpose programming language and toolchain for maintaining
44
**robust**, **optimal**, and **reusable** software.
55

6-
<https://ziglang.org/>
6+
https://ziglang.org/
77

88
## Documentation
99

@@ -232,9 +232,11 @@ You now have the `zig.exe` binary at `bin\zig.exe` and you can run the tests:
232232
bin\zig.exe build test
233233
```
234234

235-
This can take a long time. For tips & tricks on using the test suite, see [Editing Source Code](#editing-source-code).
235+
This can take a long time.
236236

237-
Note: In case you get the error "llvm-config not found" (or similar), make sure that you have **no** trailing slash (`/` or `\`) at the end of the `-DCMAKE_PREFIX_PATH` value.
237+
Note: In case you get the error "llvm-config not found" (or similar), make sure
238+
that you have **no** trailing slash (`/` or `\`) at the end of the
239+
`-DCMAKE_PREFIX_PATH` value.
238240

239241
## Building LLVM, LLD, and Clang from Source
240242

@@ -745,40 +747,55 @@ provided by the `zig std` HTTP server as well as produced by `-femit-docs`.
745747

746748
## Testing Zig Code With LLDB
747749

748-
[@jacobly0](https://github.com/jacobly0) maintains a fork of LLDB with Zig support: <https://github.com/jacobly0/llvm-project/tree/lldb-zig>
750+
[@jacobly0](https://github.com/jacobly0) maintains a fork of LLDB with Zig support:
749751

750-
This fork only contains changes for debugging programs compiled by Zig's self-hosted backends, i.e. `zig build-exe -fno-llvm ...`.
752+
https://github.com/jacobly0/llvm-project/tree/lldb-zig
753+
754+
This fork only contains changes for debugging programs compiled by Zig's
755+
self-hosted backends, i.e. `zig build-exe -fno-llvm ...`.
751756

752757
### Building
753758

754-
To build the LLDB fork, make sure you have [prerequisites](https://lldb.llvm.org/resources/build.html#preliminaries) installed, and then do something like:
759+
To build the LLDB fork, make sure you have
760+
[prerequisites](https://lldb.llvm.org/resources/build.html#preliminaries)
761+
installed, and then do something like:
755762

756-
```console
763+
```
757764
$ cmake llvm -G Ninja -B build -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON -DLLDB_ENABLE_LIBEDIT=ON -DLLDB_ENABLE_PYTHON=ON
758765
$ cmake --build build --target lldb --target lldb-server
759766
```
760767

761-
(You may need to manually [configure dependencies](https://lldb.llvm.org/resources/build.html#optional-dependencies) if CMake can't find them.)
768+
(You may need to manually [configure
769+
dependencies](https://lldb.llvm.org/resources/build.html#optional-dependencies)
770+
if CMake can't find them.)
762771

763772
Once built, you can run `./build/bin/lldb` and so on.
764773

765774
### Pretty Printers
766775

767-
If you will be debugging the Zig compiler itself, or if you will be debugging any project compiled with Zig's LLVM backend (not recommended with the LLDB fork, prefer vanilla LLDB with a version that matches the version of LLVM that Zig is using), you can get a better debugging experience by using [`lldb_pretty_printers.py`](https://github.com/ziglang/zig/blob/master/tools/lldb_pretty_printers.py).
776+
If you will be debugging the Zig compiler itself, or if you will be debugging
777+
any project compiled with Zig's LLVM backend (not recommended with the LLDB
778+
fork, prefer vanilla LLDB with a version that matches the version of LLVM that
779+
Zig is using), you can get a better debugging experience by using
780+
[`lldb_pretty_printers.py`](https://github.com/ziglang/zig/blob/master/tools/lldb_pretty_printers.py).
768781

769782
Put this line in `~/.lldbinit`:
770783

771784
```
772785
command script import /path/to/zig/tools/lldb_pretty_printers.py
773786
```
774787

775-
If you will be using Zig's LLVM backend (again, not recommended with the LLDB fork), you will also want these lines:
788+
If you will be using Zig's LLVM backend (again, not recommended with the LLDB
789+
fork), you will also want these lines:
776790

777791
```
778792
type category enable zig.lang
779793
type category enable zig.std
780794
```
781-
If you will be debugging a Zig compiler built using Zig's LLVM backend (again, not recommended with the LLDB fork), you will also want this line:
795+
796+
If you will be debugging a Zig compiler built using Zig's LLVM backend (again,
797+
not recommended with the LLDB fork), you will also want this line:
798+
782799
```
783800
type category enable zig.stage2
784801
```

0 commit comments

Comments
 (0)