about summary refs log tree commit diff
path: root/tests/run-make
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-15 00:04:01 +0000
committerbors <bors@rust-lang.org>2024-06-15 00:04:01 +0000
commit3fc81daffd18aa1fc00a1d67cfaca12a32a07e46 (patch)
tree5f92b09d596845506470e36bcc30069612a1837e /tests/run-make
parentf8e566053207b4ecbcbc7a7d6ded82c43061e3da (diff)
parent186d94dc6be108d7e507e4a5129375335149cd23 (diff)
downloadrust-3fc81daffd18aa1fc00a1d67cfaca12a32a07e46.tar.gz
rust-3fc81daffd18aa1fc00a1d67cfaca12a32a07e46.zip
Auto merge of #122613 - Zalathar:profiler, r=nnethercote
Don't build a broken/untested profiler runtime on mingw targets

Context: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Why.20build.20a.20broken.2Funtested.20profiler.20runtime.20on.20mingw.3F

#75872 added `--enable-profiler` to the `x86_64-mingw` job (to cause some additional tests to run), but had to also add `//@ ignore-windows-gnu` to all of the tests that rely on the profiler runtime actually *working*, because it's broken on that target.

We can achieve a similar outcome by going through all the `//@ needs-profiler-support` tests that don't actually need to produce/run a binary, and making them use `-Zno-profiler-runtime` instead, so that they can run even in configurations that don't have the profiler runtime available. Then we can remove `--enable-profiler` from `x86_64-mingw`, and still get the same amount of testing.

This PR also removes `--enable-profiler` from the mingw dist builds, since it is broken/untested on that target. Those builds have had that flag for a very long time.
Diffstat (limited to 'tests/run-make')
-rw-r--r--tests/run-make/optimization-remarks-dir-pgo/Makefile4
-rw-r--r--tests/run-make/pgo-branch-weights/rmake.rs4
-rw-r--r--tests/run-make/pgo-gen-lto/Makefile4
-rw-r--r--tests/run-make/pgo-gen-no-imp-symbols/Makefile4
-rw-r--r--tests/run-make/pgo-gen/Makefile4
-rw-r--r--tests/run-make/pgo-indirect-call-promotion/Makefile4
-rw-r--r--tests/run-make/pgo-use/Makefile4
-rw-r--r--tests/run-make/track-pgo-dep-info/Makefile1
8 files changed, 1 insertions, 28 deletions
diff --git a/tests/run-make/optimization-remarks-dir-pgo/Makefile b/tests/run-make/optimization-remarks-dir-pgo/Makefile
index 3bc3d7d1428..57ffd6e70f0 100644
--- a/tests/run-make/optimization-remarks-dir-pgo/Makefile
+++ b/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
diff --git a/tests/run-make/pgo-branch-weights/rmake.rs b/tests/run-make/pgo-branch-weights/rmake.rs
index 55f6e7e56c5..d3cb79c39af 100644
--- a/tests/run-make/pgo-branch-weights/rmake.rs
+++ b/tests/run-make/pgo-branch-weights/rmake.rs
@@ -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;
 
diff --git a/tests/run-make/pgo-gen-lto/Makefile b/tests/run-make/pgo-gen-lto/Makefile
index 8b647846af3..54164c99522 100644
--- a/tests/run-make/pgo-gen-lto/Makefile
+++ b/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)"
diff --git a/tests/run-make/pgo-gen-no-imp-symbols/Makefile b/tests/run-make/pgo-gen-no-imp-symbols/Makefile
index 7f72b11b611..d2baa145ba5 100644
--- a/tests/run-make/pgo-gen-no-imp-symbols/Makefile
+++ b/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
diff --git a/tests/run-make/pgo-gen/Makefile b/tests/run-make/pgo-gen/Makefile
index bf32cfdb802..c1d456986fb 100644
--- a/tests/run-make/pgo-gen/Makefile
+++ b/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)"
diff --git a/tests/run-make/pgo-indirect-call-promotion/Makefile b/tests/run-make/pgo-indirect-call-promotion/Makefile
index 542eb244d39..8d1e69c4aba 100644
--- a/tests/run-make/pgo-indirect-call-promotion/Makefile
+++ b/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:
diff --git a/tests/run-make/pgo-use/Makefile b/tests/run-make/pgo-use/Makefile
index 9f440118dae..92098a4019c 100644
--- a/tests/run-make/pgo-use/Makefile
+++ b/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
diff --git a/tests/run-make/track-pgo-dep-info/Makefile b/tests/run-make/track-pgo-dep-info/Makefile
index 6c7f67d0f0a..3afe3662fa7 100644
--- a/tests/run-make/track-pgo-dep-info/Makefile
+++ b/tests/run-make/track-pgo-dep-info/Makefile
@@ -1,5 +1,4 @@
 # needs-profiler-support
-# ignore-windows-gnu
 
 include ../tools.mk