Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't build a broken/untested profiler runtime on mingw targets #122613

Merged
merged 4 commits into from
Jun 15, 2024
Merged
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
6 changes: 1 addition & 5 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,7 @@ auto:
- image: x86_64-mingw
env:
SCRIPT: make ci-mingw
RUST_CONFIGURE_ARGS: >-
--build=x86_64-pc-windows-gnu
--enable-profiler
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
# We are intentionally allowing an old toolchain on this builder (and that's
# incompatible with LLVM downloads today).
NO_DOWNLOAD_CI_LLVM: 1
Expand Down Expand Up @@ -440,7 +438,6 @@ auto:
RUST_CONFIGURE_ARGS: >-
--build=i686-pc-windows-gnu
--enable-full-tools
--enable-profiler
# We are intentionally allowing an old toolchain on this builder (and that's
# incompatible with LLVM downloads today).
NO_DOWNLOAD_CI_LLVM: 1
Expand All @@ -454,7 +451,6 @@ auto:
RUST_CONFIGURE_ARGS: >-
--build=x86_64-pc-windows-gnu
--enable-full-tools
--enable-profiler
# We are intentionally allowing an old toolchain on this builder (and that's
# incompatible with LLVM downloads today).
NO_DOWNLOAD_CI_LLVM: 1
Expand Down
3 changes: 0 additions & 3 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,9 +1023,6 @@ fn iter_header(
if mode == Mode::CoverageRun {
let extra_directives: &[&str] = &[
"needs-profiler-support",
// FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
// properly. Since we only have GCC on the CI ignore the test for now.
"ignore-windows-gnu",
// FIXME(pietroalbini): this test currently does not work on cross-compiled
// targets because remote-test is not capable of sending back the *.profraw
// files generated by the LLVM instrumentation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Test that `-Cinstrument-coverage=off` does not add coverage instrumentation to LLVM IR.

//@ compile-flags: -Zno-profiler-runtime
//@ revisions: n no off false_ zero
//@ [n] compile-flags: -Cinstrument-coverage=n
//@ [no] compile-flags: -Cinstrument-coverage=no
Expand Down
6 changes: 3 additions & 3 deletions tests/codegen/instrument-coverage/instrument-coverage.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR.

//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ revisions: default y yes on true_ all
//@ [default] compile-flags: -Cinstrument-coverage
//@ [y] compile-flags: -Cinstrument-coverage=y
Expand All @@ -9,8 +9,8 @@
//@ [true_] compile-flags: -Cinstrument-coverage=true
//@ [all] compile-flags: -Cinstrument-coverage=all

// CHECK: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}}
// CHECK: @__llvm_coverage_mapping
// CHECK-DAG: @__llvm_coverage_mapping
// CHECK-DAG: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}}

#![crate_type = "lib"]

Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/instrument-coverage/testprog.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ edition: 2021
//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ compile-flags: -Cinstrument-coverage -Copt-level=0
//@ revisions: LINUX DARWIN WINDOWS

Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/naked-fn/naked-nocoverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Regression test for issue #105170.
//
//@ needs-asm-support
//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ compile-flags: -Cinstrument-coverage
#![crate_type = "lib"]
#![feature(naked_functions)]
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/pgo-counter-bias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//@ ignore-apple -runtime-counter-relocation not honored on Mach-O
//@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat
//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ no-prefer-dynamic

// CHECK: @__llvm_profile_counter_bias = {{.*}}global
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/pgo-instrumentation.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Test that `-Cprofile-generate` creates expected instrumentation artifacts in LLVM IR.

//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ compile-flags: -Cprofile-generate -Ccodegen-units=1

// CHECK: @__llvm_profile_raw_version =
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/optimization-remarks-dir-pgo/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# needs-profiler-support
# ignore-windows-gnu
# ignore-cross-compile

# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now.

include ../tools.mk

PROFILE_DIR=$(TMPDIR)/profiles
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-branch-weights/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
//@ needs-profiler-support
//@ ignore-cross-compile

// FIXME(Oneirical): This test has problems generating profdata on mingw.
// For more information, see https://github.com/rust-lang/rust/pull/122613
//@ ignore-windows-gnu

use run_make_support::{fs_wrapper, llvm_filecheck, llvm_profdata, run_with_args, rustc};
use std::path::Path;

Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-gen-lto/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# needs-profiler-support
# ignore-windows-gnu
# ignore-cross-compile

# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now.

include ../tools.mk

COMPILE_FLAGS=-Copt-level=3 -Clto=fat -Cprofile-generate="$(TMPDIR)"
Expand Down
4 changes: 1 addition & 3 deletions tests/run-make/pgo-gen-no-imp-symbols/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# needs-profiler-support

include ../tools.mk

COMPILE_FLAGS=-O -Ccodegen-units=1 -Cprofile-generate="$(TMPDIR)"
COMPILE_FLAGS=-O -Ccodegen-units=1 -Cprofile-generate="$(TMPDIR)" -Zno-profiler-runtime

all:
$(RUSTC) $(COMPILE_FLAGS) --emit=llvm-ir test.rs
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-gen/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# needs-profiler-support
# ignore-windows-gnu
# ignore-cross-compile

# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now.

include ../tools.mk

COMPILE_FLAGS=-g -Cprofile-generate="$(TMPDIR)"
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-indirect-call-promotion/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# needs-profiler-support
# ignore-windows-gnu
# ignore-cross-compile

# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now.

include ../tools.mk

all:
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-use/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# needs-profiler-support
# ignore-windows-gnu
# ignore-cross-compile

# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works
# properly. Since we only have GCC on the CI ignore the test for now.

include ../tools.mk

# This test makes sure that PGO profiling data leads to cold functions being
Expand Down
1 change: 0 additions & 1 deletion tests/run-make/track-pgo-dep-info/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# needs-profiler-support
# ignore-windows-gnu

include ../tools.mk

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/instrument-coverage/coverage-options.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ needs-profiler-support
//@ revisions: block branch condition mcdc bad
//@ compile-flags -Cinstrument-coverage
//@ compile-flags -Cinstrument-coverage -Zno-profiler-runtime

//@ [block] check-pass
//@ [block] compile-flags: -Zcoverage-options=block
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/instrument-coverage/on-values.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ check-pass
//@ needs-profiler-support
//@ compile-flags: -Zno-profiler-runtime
//@ revisions: default y yes on true_ all
//@ [default] compile-flags: -Cinstrument-coverage
//@ [y] compile-flags: -Cinstrument-coverage=y
Expand Down
Loading