Skip to content

Commit 2f7620a

Browse files
committed
Auto merge of #146414 - GuillaumeGomez:run-test-with-gcc-backend, r=Kobzol
Add a CI job that runs a subset of UI tests with the GCC backend Part of rust-lang/compiler-team#891. r? `@Kobzol`
2 parents fb24b04 + 9d15d66 commit 2f7620a

File tree

484 files changed

+1657
-1236
lines changed

Some content is hidden

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

484 files changed

+1657
-1236
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
FROM ubuntu:22.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
bzip2 \
6+
g++ \
7+
make \
8+
ninja-build \
9+
file \
10+
curl \
11+
ca-certificates \
12+
python3 \
13+
git \
14+
cmake \
15+
sudo \
16+
gdb \
17+
libssl-dev \
18+
pkg-config \
19+
xz-utils \
20+
mingw-w64 \
21+
zlib1g-dev \
22+
libzstd-dev \
23+
# libgccjit dependencies
24+
flex \
25+
libmpfr-dev \
26+
libgmp-dev \
27+
libmpc3 \
28+
libmpc-dev \
29+
&& rm -rf /var/lib/apt/lists/*
30+
31+
COPY scripts/sccache.sh /scripts/
32+
RUN sh /scripts/sccache.sh
33+
34+
ENV NO_DEBUG_ASSERTIONS 1
35+
ENV RUST_CONFIGURE_ARGS \
36+
--build=x86_64-unknown-linux-gnu \
37+
--enable-sanitizers \
38+
--enable-profiler \
39+
--enable-compiler-docs \
40+
--set llvm.libzstd=true \
41+
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'
42+
ENV SCRIPT python3 ../x.py \
43+
--stage 2 \
44+
test tests \
45+
--test-codegen-backend gcc \
46+
--skip tests/coverage \
47+
--skip tests/coverage-run-rustdoc \
48+
--skip tests/rustdoc \
49+
--skip tests/rustdoc-gui \
50+
--skip tests/rustdoc-js \
51+
--skip tests/rustdoc-js-std \
52+
--skip tests/rustdoc-json \
53+
--skip tests/rustdoc-ui \
54+
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'

src/ci/github-actions/jobs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ pr:
141141
<<: *job-linux-4c
142142
- name: x86_64-gnu-miri
143143
<<: *job-linux-4c
144+
- name: x86_64-gnu-gcc
145+
doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
146+
<<: *job-linux-4c
144147

145148
# Jobs that run when you perform a try build (@bors try)
146149
# These jobs automatically inherit envs.try, to avoid repeating
@@ -348,6 +351,10 @@ auto:
348351
- name: x86_64-gnu
349352
<<: *job-linux-4c
350353

354+
- name: x86_64-gnu-gcc
355+
doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
356+
<<: *job-linux-4c
357+
351358
# This job ensures commits landing on nightly still pass the full
352359
# test suite on the stable channel. There are some UI tests that
353360
# depend on the channel being built (for example if they include the

tests/crashes/118244.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #118244
22
//@ compile-flags: -Cdebuginfo=2
3+
//@ ignore-backends: gcc
34

45
#![allow(incomplete_features)]
56
#![feature(generic_const_exprs)]

tests/crashes/134479.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #134479
22
//@ compile-flags: -Csymbol-mangling-version=v0 -Cdebuginfo=1
3+
//@ ignore-backends: gcc
34

45
#![feature(generic_const_exprs)]
56

tests/crashes/139462.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ known-bug: #139462
22
//@ compile-flags: -Cdebuginfo=2
3+
//@ ignore-backends: gcc
34
#![feature(unsafe_binders)]
45
use std::unsafe_binder::wrap_binder;
56
fn main() {

tests/crashes/34127.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ compile-flags: -g -Copt-level=0 -Z verify-llvm-ir
22
//@ known-bug: #34127
33
//@ only-64bit
4+
//@ ignore-backends: gcc
45

56
pub fn main() {
67
let _a = [(); 1 << 63];

tests/debuginfo/associated-types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags:-g
22
//@ disable-gdb-pretty-printers
3+
//@ ignore-backends: gcc
34

45
// === GDB TESTS ===================================================================================
56
// gdb-command:run

tests/debuginfo/basic-stepping.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//@ ignore-loongarch64: Doesn't work yet.
77
//@ ignore-riscv64: Doesn't work yet.
88
//@ compile-flags: -g
9+
//@ ignore-backends: gcc
910

1011
// gdb-command: run
1112
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?

tests/debuginfo/basic-types-globals-metadata.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags:-g
22
//@ disable-gdb-pretty-printers
3+
//@ ignore-backends: gcc
34

45
// gdb-command:run
56
// gdb-command:whatis basic_types_globals_metadata::B

tests/debuginfo/basic-types-globals.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
//@ [lto] compile-flags:-C lto
77
//@ [lto] no-prefer-dynamic
8+
//@ ignore-backends: gcc
89

910
// lldb-command:run
1011
// lldb-command:v B

0 commit comments

Comments
 (0)