Skip to content

Commit 5316d89

Browse files
authored
[docs] Move build local instructions to proper docs (#954)
[skip tests]
1 parent 57d86f1 commit 5316d89

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

docs/make.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pages = [
3636
"Overview" => "tutorials/index.md",
3737
"Profiling" => "tutorials/profiling.md",
3838
"Distributed" => "tutorials/multihost.md",
39+
"Local build" => "tutorials/local-build.md",
3940
],
4041
"API Reference" => [
4142
"Reactant API" => "api/api.md",

docs/src/.vitepress/config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default defineConfig({
6464
{text: "Overview", link: "/tutorials/"},
6565
{text: "Profiling", link: "/tutorials/profiling"},
6666
{text: "Distributed", link: "/tutorials/multihost"},
67+
{text: "Local build", link: "/tutorials/local-build"},
6768
],
6869
},
6970
{
@@ -124,6 +125,7 @@ export default defineConfig({
124125
{ text: "Overview", link: "/tutorials/" },
125126
{ text: "Profiling", link: "/tutorials/profiling" },
126127
{ text: "Distributed", link: "/tutorials/multihost" },
128+
{ text: "Local build", link: "/tutorials/local-build" },
127129
],
128130
},
129131
"/api/": {

docs/src/tutorials/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
- [Profiling](@ref profiling).
44
- [Multi-Host Environments](@ref distributed).
5+
- [Local build of ReactantExtra](@ref local-build).
56

67
We are currently working on adding more tutorials to Reactant!! Please check back soon!

deps/README.md renamed to docs/src/tutorials/local-build.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Local build of ReactantExtra
1+
# [Local build of ReactantExtra](@ref local-build)
22

3-
The script in this directory can be used to do local builds of ReactantExtra, including debug builds.
3+
In the `deps/` subdirectory of the Reactant repository there is a script to do local builds of ReactantExtra, including debug builds.
44

5-
### Requirements
5+
## Requirements
66

77
* Julia. If you don't have it already, you can obtain it from the [official Julia website](https://julialang.org/downloads/)
88
* A reasonably recent C/C++ compiler, ideally GCC 12+.
@@ -12,20 +12,20 @@ The script in this directory can be used to do local builds of ReactantExtra, in
1212
Binutils `ld` won't work, don't even try using it.
1313
You can obtain `mold` for your platform from the [latest `rui314/mold` release](https://github.com/rui314/mold/releases/latest) and put the `mold` executable in `PATH`
1414

15-
### Building
15+
## Building
1616

17-
At a high-level, you can run the commands
17+
At a high-level, after you `cd` to the `deps/` directory you can run the commands
1818

19-
```
20-
julia --project -e 'using Pkg; Pkg.instantiate()' # needed only the first time to install Julia's deps
19+
```bash
20+
julia --project -e 'using Pkg; Pkg.instantiate()' # needed only the first time to install dependencies for this script
2121
julia -O0 --color=yes --project build_local.jl
2222
```
2323

24-
There are a few of options you may want to use.
24+
There are a few of options you may want to use to tweak the build.
2525
For more information run the command (what's show below may not be up to date, run the command locally to see the options available to you):
2626

2727
```console
28-
% julia --project build_local.jl --help
28+
% julia -O0 --project build_local.jl --help
2929
usage: build_local.jl [--debug] [--backend BACKEND]
3030
[--gcc_host_compiler_path GCC_HOST_COMPILER_PATH]
3131
[--cc CC]
@@ -61,13 +61,13 @@ optional arguments:
6161

6262
If you try to do the build on certain systems where there are in place restrictions on the number of processes or memory that your user can use (for example login node of clusters), you may have to limit the number of parallel jobs used by Bazel.
6363
By default Bazel would try to use the maximum number of CPUs available on the system, if you need reduce that pass the `--jobs JOBS` flag option.
64-
The Bazel server may be terminated abruptly if using too much memory (e.g. if concurrent compiler processes are cumulatively using too much memory), also in this case reducing the number of parallel jobs may be beneficial.
64+
The Bazel server may be terminated abruptly if using too much memory (e.g. if concurrent compiler processes are cumulatively using a large amount of memory), also in this case reducing the number of parallel jobs may be beneficial.
6565

6666
### CUDA debug build
6767

68-
A CUDA debug build (`--debug --backend=cuda`) requires a recent GCC compiler and also a fast linker (see requirements above).
69-
You can tell GCC to use either `lld` or `mold` with `--extraopt '--linkopt=-fuse-ld=Lld'` or `--extraopt '--linkopt=-fuse-ld=mold'` respectively.
70-
NOTE: the option `-fuse-ld=mold` was added in GCC 12, if you're trying to use an older version you can have some luck by making a symlink `ld` pointing to `mold` in `PATH`, with higher precendce than Binutils `ld`.
68+
A CUDA debug build (`--debug --backend=cuda`) requires a recent GCC compiler (at least v12) and also a fast linker (see requirements above).
69+
You can tell GCC to use either `lld` or `mold` with `--extraopt '--linkopt=-fuse-ld=lld'` or `--extraopt '--linkopt=-fuse-ld=mold'` respectively.
70+
NOTE: the option `-fuse-ld=mold` was added in GCC 12, if you're trying to use an older version you can have some luck by making a symlink named `ld` pointing to `mold` in `PATH`, with higher precendce than Binutils `ld`.
7171

7272
### Using ccache
7373

0 commit comments

Comments
 (0)