Skip to content

Commit

Permalink
Updating readme instructions (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerson2102 authored Apr 17, 2024
1 parent 56a022f commit 6e5395a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ This is a GCC codegen for rustc, which means it can be loaded by the existing ru
The primary goal of this project is to be able to compile Rust code on platforms unsupported by LLVM.
A secondary goal is to check if using the gcc backend will provide any run-time speed improvement for the programs compiled using rustc.

### Dependencies

**rustup:** Follow the instructions on the official [website](https://www.rust-lang.org/tools/install)

## Building

**This requires a patched libgccjit in order to work.
Expand Down Expand Up @@ -91,10 +95,16 @@ $ ./y.sh test --release

## Usage

`$CG_GCCJIT_DIR` is the directory you cloned this repo into in the following instructions:
You have to run these commands, in the corresponding order:

```bash
export CG_GCCJIT_DIR=[the full path to rustc_codegen_gcc]
$ ./y.sh prepare
$ ./y.sh build --sysroot
```
To check if all is working correctly, run:

```bash
$ ./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml
```

### Cargo
Expand Down

0 comments on commit 6e5395a

Please sign in to comment.