File tree 5 files changed +46
-2
lines changed
5 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 62
62
path : target
63
63
key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
64
64
65
+ - name : Build
66
+ run : |
67
+ ./prepare_build.sh
68
+ ./build.sh
69
+ ./clean_all.sh
70
+
65
71
- name : Prepare dependencies
66
72
run : |
67
73
git config --global user.email "[email protected] "
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ You can also use my [fork of gcc](https://github.com/antoyo/gcc) which already i
21
21
``` bash
22
22
$ git clone https://github.com/antoyo/rustc_codegen_gcc.git
23
23
$ cd rustc_codegen_gcc
24
+ $ ./prepare_build.sh # download and patch sysroot src
25
+ $ ./build.sh --release
26
+ ```
27
+
28
+ To run the tests:
29
+
30
+ ``` bash
24
31
$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
25
32
$ ./test.sh --release
26
33
```
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # set -x
4
+ set -e
5
+
6
+ export GCC_PATH=$( cat gcc_path)
7
+
8
+ export LD_LIBRARY_PATH=" $GCC_PATH "
9
+ export LIBRARY_PATH=" $GCC_PATH "
10
+
11
+ if [[ " $1 " == " --release" ]]; then
12
+ export CHANNEL=' release'
13
+ CARGO_INCREMENTAL=1 cargo rustc --release
14
+ else
15
+ echo $LD_LIBRARY_PATH
16
+ export CHANNEL=' debug'
17
+ cargo rustc
18
+ fi
19
+
20
+ source config.sh
21
+
22
+ rm -r target/out || true
23
+ mkdir -p target/out/gccjit
24
+
25
+ echo " [BUILD] sysroot"
26
+ time ./build_sysroot/build_sysroot.sh $CHANNEL
Original file line number Diff line number Diff line change 1
1
#! /bin/bash --verbose
2
2
set -e
3
3
4
- rustup component add rust-src rustc-dev llvm-tools-preview
5
- ./build_sysroot/prepare_sysroot_src.sh
4
+ source prepare_build.sh
5
+
6
6
cargo install hyperfine || echo " Skipping hyperfine install"
7
7
8
8
git clone https://github.com/rust-lang/regex.git || echo " rust-lang/regex has already been cloned"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash --verbose
2
+ set -e
3
+
4
+ rustup component add rust-src rustc-dev llvm-tools-preview
5
+ ./build_sysroot/prepare_sysroot_src.sh
You can’t perform that action at this time.
0 commit comments