File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 7171$ $cg_clif_dir /build/bin/cg_clif -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
7272```
7373
74+ There is also an experimental lazy jit mode. In this mode functions are only compiled once they are
75+ first called. It currently does not work with multi-threaded programs. When a not yet compiled
76+ function is called from another thread than the main thread, you will get an ICE.
77+
78+ ``` bash
79+ $ $cg_clif_dir /build/cargo.sh lazy-jit
80+ ```
81+
7482### Shell
7583
7684These are a few functions that allow you to easily run rust code from the shell using cg_clif as jit.
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ shift || true
1111
1212if [[ " $cmd " = " jit" ]]; then
1313cargo " +${TOOLCHAIN} " rustc " $@ " -- -Cllvm-args=mode=jit -Cprefer-dynamic
14+ elif [[ " $cmd " = " lazy-jit" ]]; then
15+ cargo " +${TOOLCHAIN} " rustc " $@ " -- -Cllvm-args=mode=jit-lazy -Cprefer-dynamic
1416else
1517cargo " +${TOOLCHAIN} " " $cmd " " $@ "
1618fi
You can’t perform that action at this time.
0 commit comments