Add instructions to build libcore
This commit is contained in:
parent
425b527dc3
commit
9615f3a137
15
Readme.md
15
Readme.md
@ -5,7 +5,7 @@
|
|||||||
## Building
|
## Building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone https://github.com/bjorn3/rustc_codegen_cranelift
|
$ git clone https://github.com/bjorn3/rustc_codegen_cranelift.git
|
||||||
$ cd rustc_codegen_cranelift
|
$ cd rustc_codegen_cranelift
|
||||||
$ git submodule update --init
|
$ git submodule update --init
|
||||||
$ cargo build
|
$ cargo build
|
||||||
@ -19,6 +19,19 @@ $ rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so my_c
|
|||||||
|
|
||||||
> You must compile with `-Og`, because checked binops are not yet supported.
|
> You must compile with `-Og`, because checked binops are not yet supported.
|
||||||
|
|
||||||
|
## Building libcore
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git clone https://github.com/rust-lang/rust.git
|
||||||
|
$ cd rust
|
||||||
|
$ git apply ../0001-Disable-stdsimd-in-libcore.patch
|
||||||
|
$ git apply ../0002-Disable-u128-and-i128-in-libcore.patch
|
||||||
|
$ cd ../
|
||||||
|
$ ./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
> ⚠⚠⚠ You will get a panic because of unimplemented stuff ⚠⚠⚠
|
||||||
|
|
||||||
## Not yet supported
|
## Not yet supported
|
||||||
|
|
||||||
* [ ] Checked binops
|
* [ ] Checked binops
|
||||||
|
2
build.sh
2
build.sh
@ -1,4 +1,4 @@
|
|||||||
cargo build || exit 1
|
cargo build || exit 1
|
||||||
|
|
||||||
rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so example.rs --crate-type lib -Og
|
rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so example.rs --crate-type lib -Og
|
||||||
rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so ../rust/src/libcore/lib.rs --crate-type lib -Og
|
rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so ./rust/src/libcore/lib.rs --crate-type lib -Og
|
||||||
|
Loading…
Reference in New Issue
Block a user