File tree Expand file tree Collapse file tree 5 files changed +46
-2
lines changed Expand file tree Collapse file tree 5 files changed +46
-2
lines changed Original file line number Diff line number Diff line change 6262 path : target
6363 key : ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
6464
65+ - name : Build
66+ run : |
67+ ./prepare_build.sh
68+ ./build.sh
69+ ./clean_all.sh
70+
6571 - name : Prepare dependencies
6672 run : |
6773 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
2121``` bash
2222$ git clone https://github.com/antoyo/rustc_codegen_gcc.git
2323$ 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
2431$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
2532$ ./test.sh --release
2633```
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 11#! /bin/bash --verbose
22set -e
33
4- rustup component add rust-src rustc-dev llvm-tools-preview
5- ./build_sysroot/prepare_sysroot_src.sh
4+ source prepare_build.sh
5+
66cargo install hyperfine || echo " Skipping hyperfine install"
77
88git 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