Skip to content

Commit f7237f1

Browse files
committed
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
git-subtree-dir: compiler/rustc_codegen_gcc git-subtree-mainline: ae90dcf git-subtree-split: afae271
2 parents ae90dcf + afae271 commit f7237f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+15608
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: antoyo
2+
patreon: antoyo
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
fail-fast: false
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Install packages
18+
run: sudo apt-get install ninja-build ripgrep
19+
20+
- name: Download artifact
21+
uses: dawidd6/action-download-artifact@v2
22+
with:
23+
workflow: main.yml
24+
name: libgccjit.so
25+
path: gcc-build
26+
repo: antoyo/gcc
27+
28+
- name: Setup path to libgccjit
29+
run: |
30+
echo $(readlink -f gcc-build) > gcc_path
31+
ln gcc-build/libgccjit.so gcc-build/libgccjit.so.0
32+
33+
- name: Set LIBRARY_PATH
34+
run: echo "LIBRARY_PATH=$(cat gcc_path)" >> $GITHUB_ENV
35+
36+
# https://github.com/actions/cache/issues/133
37+
- name: Fixup owner of ~/.cargo/
38+
# Don't remove the trailing /. It is necessary to follow the symlink.
39+
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
40+
41+
- name: Cache cargo installed crates
42+
uses: actions/cache@v1.1.2
43+
with:
44+
path: ~/.cargo/bin
45+
key: cargo-installed-crates2-ubuntu-latest
46+
47+
- name: Cache cargo registry
48+
uses: actions/cache@v1
49+
with:
50+
path: ~/.cargo/registry
51+
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
52+
53+
- name: Cache cargo index
54+
uses: actions/cache@v1
55+
with:
56+
path: ~/.cargo/git
57+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
58+
59+
- name: Cache cargo target dir
60+
uses: actions/cache@v1.1.2
61+
with:
62+
path: target
63+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
64+
65+
- name: Build
66+
run: |
67+
./prepare_build.sh
68+
./build.sh
69+
./clean_all.sh
70+
71+
- name: Prepare dependencies
72+
run: |
73+
git config --global user.email "user@example.com"
74+
git config --global user.name "User"
75+
./prepare.sh
76+
77+
# Compile is a separate step, as the actions-rs/cargo action supports error annotations
78+
- name: Compile
79+
uses: actions-rs/cargo@v1.0.3
80+
with:
81+
command: build
82+
args: --release
83+
84+
- name: Test
85+
run: |
86+
# Enable backtraces for easier debugging
87+
export RUST_BACKTRACE=1
88+
89+
# Reduce amount of benchmark runs as they are slow
90+
export COMPILE_RUNS=2
91+
export RUN_RUNS=2
92+
93+
./test.sh --release

compiler/rustc_codegen_gcc/.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
target
2+
**/*.rs.bk
3+
*.rlib
4+
*.o
5+
perf.data
6+
perf.data.old
7+
*.events
8+
*.string*
9+
/build_sysroot/sysroot
10+
/build_sysroot/Cargo.lock
11+
/build_sysroot/test_target/Cargo.lock
12+
/rust
13+
/regex
14+
gimple*
15+
*asm
16+
res
17+
test-backend

0 commit comments

Comments
 (0)