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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/ci/github-actions/jobs.yml
Expand Up @@ -383,9 +383,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 @@ -433,7 +431,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 @@ -448,7 +445,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
Expand Up @@ -1000,9 +1000,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
@@ -1,6 +1,6 @@
// Test that `-Cinstrument-coverage=off` does not add coverage instrumentation to LLVM IR.

//@ needs-profiler-support
//@ 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
2 changes: 1 addition & 1 deletion tests/codegen/instrument-coverage/instrument-coverage.rs
@@ -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 Down
2 changes: 1 addition & 1 deletion tests/codegen/instrument-coverage/testprog.rs
@@ -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
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
Expand Up @@ -2,7 +2,7 @@

//@ ignore-macos -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
@@ -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
@@ -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/Makefile
@@ -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

# For some very small programs GNU ld seems to not properly handle
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/pgo-gen-lto/Makefile
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,5 +1,4 @@
# needs-profiler-support
# ignore-windows-gnu

include ../tools.mk

Expand Down
5 changes: 2 additions & 3 deletions tests/ui/instrument-coverage/coverage-options.rs
@@ -1,6 +1,5 @@
//@ needs-profiler-support
//@ revisions: block branch bad
//@ compile-flags -Cinstrument-coverage
//@ revisions: block branch mcdc bad
//@ 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
@@ -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