Auto merge of #75872 - mati865:pgo-tests, r=petrochenkov

Enable some of profiler tests on Windows-gnu

CC https://github.com/rust-lang/rust/issues/61266

Because of force-push GitHub didn't let me reopen https://github.com/rust-lang/rust/pull/75184

Because of the GCC miscompilation, generated binaries either segfault or `.profraw` is malformed. Clang works fine but we can't use it on the CI.
However we can still test the IR for the proper instrumentation so let's do it.
This commit is contained in:
bors 2020-09-05 17:18:26 +00:00
commit 04f44fb923
11 changed files with 35 additions and 7 deletions

View File

@ -431,7 +431,7 @@ jobs:
- name: x86_64-mingw-1
env:
SCRIPT: make ci-mingw-subset-1
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu"
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
CUSTOM_MINGW: 1
NO_DEBUG_ASSERTIONS: 1
NO_LLVM_ASSERTIONS: 1
@ -439,7 +439,7 @@ jobs:
- name: x86_64-mingw-2
env:
SCRIPT: make ci-mingw-subset-2
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu"
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
CUSTOM_MINGW: 1
os: windows-latest-xl
- name: dist-x86_64-msvc

View File

@ -48,10 +48,10 @@ fn main() {
// Turn off various features of gcc and such, mostly copying
// compiler-rt's build system already
cfg.flag("-fno-builtin");
cfg.flag("-fvisibility=hidden");
cfg.flag("-fomit-frame-pointer");
cfg.define("VISIBILITY_HIDDEN", None);
if !target.contains("windows") {
cfg.flag("-fvisibility=hidden");
cfg.define("COMPILER_RT_HAS_UNAME", Some("1"));
} else {
profile_sources.push("WindowsMMap.c");

View File

@ -523,7 +523,7 @@ jobs:
- name: x86_64-mingw-1
env:
SCRIPT: make ci-mingw-subset-1
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
CUSTOM_MINGW: 1
# FIXME(#59637)
NO_DEBUG_ASSERTIONS: 1
@ -533,7 +533,7 @@ jobs:
- name: x86_64-mingw-2
env:
SCRIPT: make ci-mingw-subset-2
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-profiler
CUSTOM_MINGW: 1
<<: *job-windows-xl

@ -1 +1 @@
Subproject commit 45790d79496be37fbce6ec57abad5af8fa7a34d7
Subproject commit 4d40ae500282dac444028358cbda8235f65e7e6a

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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.
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.

View File

@ -1,5 +1,9 @@
# needs-profiler-support
# ignore-msvc
# ignore-windows-gnu
# 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.
# LINK_DEAD_CODE requires ignore-msvc due to Issue #76038
LINK_DEAD_CODE=yes
@ -8,4 +12,4 @@ LINK_DEAD_CODE=yes
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../instrument-coverage/coverage_tools.mk for more information.

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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

View File

@ -1,4 +1,8 @@
# needs-profiler-support
# ignore-windows-gnu
# 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