File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 71
71
$ $cg_clif_dir /build/bin/cg_clif -Cllvm-args=mode=jit -Cprefer-dynamic my_crate.rs
72
72
```
73
73
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
+
74
82
### Shell
75
83
76
84
These 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
11
11
12
12
if [[ " $cmd " = " jit" ]]; then
13
13
cargo " +${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
14
16
else
15
17
cargo " +${TOOLCHAIN} " " $cmd " " $@ "
16
18
fi
You can’t perform that action at this time.
0 commit comments