Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
g++ \
make \
ninja-build \
file \
curl \
ca-certificates \
python3 \
git \
cmake \
sudo \
gdb \
libssl-dev \
pkg-config \
xz-utils \
mingw-w64 \
zlib1g-dev \
libzstd-dev \
# libgccjit dependencies
flex \
libmpfr-dev \
libgmp-dev \
libmpc3 \
libmpc-dev \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV NO_DEBUG_ASSERTIONS 1
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs \
--set llvm.libzstd=true \
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'
ENV SCRIPT python3 ../x.py \
--stage 2 \
test tests \
--test-codegen-backend gcc \
--skip tests/coverage \
--skip tests/coverage-run-rustdoc \
--skip tests/rustdoc \
--skip tests/rustdoc-gui \
--skip tests/rustdoc-js \
--skip tests/rustdoc-js-std \
--skip tests/rustdoc-json \
--skip tests/rustdoc-ui \
--set 'rust.codegen-backends=[\"llvm\",\"gcc\"]'
7 changes: 7 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ pr:
<<: *job-linux-4c
- name: x86_64-gnu-miri
<<: *job-linux-4c
- name: x86_64-gnu-gcc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: remove before merging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want this to run on each PR or did I misunderstand when this one is run?

doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
<<: *job-linux-4c

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

- name: x86_64-gnu-gcc
doc_url: https://rustc-dev-guide.rust-lang.org/tests/codegen-backend-tests/cg_gcc.html
<<: *job-linux-4c

# This job ensures commits landing on nightly still pass the full
# test suite on the stable channel. There are some UI tests that
# depend on the channel being built (for example if they include the
Expand Down
1 change: 1 addition & 0 deletions tests/crashes/118244.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ known-bug: #118244
//@ compile-flags: -Cdebuginfo=2
//@ ignore-backends: gcc

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
Expand Down
1 change: 1 addition & 0 deletions tests/crashes/134479.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ known-bug: #134479
//@ compile-flags: -Csymbol-mangling-version=v0 -Cdebuginfo=1
//@ ignore-backends: gcc

#![feature(generic_const_exprs)]

Expand Down
1 change: 1 addition & 0 deletions tests/crashes/139462.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ known-bug: #139462
//@ compile-flags: -Cdebuginfo=2
//@ ignore-backends: gcc
#![feature(unsafe_binders)]
use std::unsafe_binder::wrap_binder;
fn main() {
Expand Down
1 change: 1 addition & 0 deletions tests/crashes/34127.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ compile-flags: -g -Copt-level=0 -Z verify-llvm-ir
//@ known-bug: #34127
//@ only-64bit
//@ ignore-backends: gcc

pub fn main() {
let _a = [(); 1 << 63];
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/associated-types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================
// gdb-command:run
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-stepping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//@ ignore-loongarch64: Doesn't work yet.
//@ ignore-riscv64: Doesn't work yet.
//@ compile-flags: -g
//@ ignore-backends: gcc

// gdb-command: run
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-types-globals-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// gdb-command:run
// gdb-command:whatis basic_types_globals_metadata::B
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-types-globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

//@ [lto] compile-flags:-C lto
//@ [lto] no-prefer-dynamic
//@ ignore-backends: gcc

// gdb-command:run
// gdb-command:print B
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-types-metadata.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// gdb-command:run
// gdb-command:whatis unit
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-types-mut-globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// gdb-command:run

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/basic-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-c-style-enum.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-tuple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/borrowed-unique-basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/box.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/boxed-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/by-value-self-argument-in-trait-impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/c-style-enum-in-composite.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/captured-fields-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ edition:2021
//@ ignore-backends: gcc
// === GDB TESTS ===================================================================================

// gdb-command:run
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/captured-fields-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ edition:2021
//@ ignore-backends: gcc
// === GDB TESTS ===================================================================================

// gdb-command:run
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/closure-in-generic-function.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// without collapse_debuginfo attribute.

//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
3 changes: 2 additions & 1 deletion tests/debuginfo/collapse-debuginfo-static-external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
// Test that static debug info is not collapsed with #[collapse_debuginfo(external)]

//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

// gdb-command:info line collapse_debuginfo_static_external::FOO
// gdb-check:[...]Line 15[...]
// gdb-check:[...]Line 16[...]

#[collapse_debuginfo(external)]
macro_rules! decl_foo {
Expand Down
3 changes: 2 additions & 1 deletion tests/debuginfo/collapse-debuginfo-static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
// Test that static debug info is collapsed with #[collapse_debuginfo(yes)]

//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

// gdb-command:info line collapse_debuginfo_static::FOO
// gdb-check:[...]Line 19[...]
// gdb-check:[...]Line 20[...]

#[collapse_debuginfo(yes)]
macro_rules! decl_foo {
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/constant-ordering-prologue.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ min-lldb-version: 310

//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/coroutine-locals.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/coroutine-objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/cross-crate-spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate cross_crate_spans;

//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc


// === GDB TESTS ===================================================================================
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/cross-crate-type-uniquing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate cross_crate_debuginfo_type_uniquing;

//@ no-prefer-dynamic
//@ compile-flags:-g -C lto
//@ ignore-backends: gcc

pub struct C;
pub fn p() -> C {
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/destructured-fn-argument.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/destructured-for-loop-variable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/destructured-local.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/dummy_span.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ min-lldb-version: 310

//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/embedded-visualizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#![debugger_visualizer(gdb_script_file = "embedded-visualizer.py")]

//@ aux-build: dependency-with-embedded-visualizers.rs
//@ ignore-backends: gcc
extern crate dependency_with_embedded_visualizers;

use dependency_with_embedded_visualizers::Person;
Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/empty-string.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ ignore-windows-gnu: #128981
//@ ignore-android: FIXME(#10381)
//@ compile-flags:-g
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/enum-thinlto.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ min-lldb-version: 1800
//@ compile-flags:-g -Z thinlto
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/evec-in-struct.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================

Expand Down
1 change: 1 addition & 0 deletions tests/debuginfo/extern-c-fn.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ compile-flags:-g
//@ disable-gdb-pretty-printers
//@ ignore-backends: gcc

// === GDB TESTS ===================================================================================
// gdb-command:run
Expand Down
Loading
Loading