Longer README about how to use this instead of cargo run
(#1054)
* Longer README about how to use this instead of `cargo run` Resolves #1052. Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
parent
a3cd293148
commit
eda840a498
@ -13,14 +13,20 @@ $ ./test.sh --release
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
`$cg_clif_dir` is the directory you cloned this repo into in the following instructions.
|
rustc_codegen_cranelift can be used as a near-drop-in replacement for `cargo build` or `cargo run` for existing projects.
|
||||||
|
|
||||||
|
Assuming `$cg_clif_dir` is the directory you cloned this repo into and you followed the instructions (`prepare.sh` and `test.sh`).
|
||||||
|
|
||||||
### Cargo
|
### Cargo
|
||||||
|
|
||||||
|
In the directory with your project (where you can do the usual `cargo build`), run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ CHANNEL="release" $cg_clif_dir/cargo.sh run
|
$ CHANNEL="release" $cg_clif_dir/cargo.sh run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This should build and run your project with rustc_codegen_cranelift instead of the usual LLVM backend.
|
||||||
|
|
||||||
If you compiled cg_clif in debug mode (aka you didn't pass `--release` to `./test.sh`) you should use `CHANNEL="debug"` instead or omit `CHANNEL="release"` completely.
|
If you compiled cg_clif in debug mode (aka you didn't pass `--release` to `./test.sh`) you should use `CHANNEL="debug"` instead or omit `CHANNEL="release"` completely.
|
||||||
|
|
||||||
### Rustc
|
### Rustc
|
||||||
|
Loading…
Reference in New Issue
Block a user