]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #76002 - richkadel:llvm-coverage-map-gen-6b.3, r=tmandry
authorTyler Mandry <tmandry@gmail.com>
Tue, 1 Sep 2020 02:18:14 +0000 (19:18 -0700)
committerGitHub <noreply@github.com>
Tue, 1 Sep 2020 02:18:14 +0000 (19:18 -0700)
Fix `-Z instrument-coverage` on MSVC

Found that `-C link-dead-code` (which was enabled automatically
under `-Z instrument-coverage`) was causing the linking error that
resulted in segmentation faults in coverage instrumented binaries. Link
dead code is now disabled under MSVC, allowing `-Z instrument-coverage`
to be enabled under MSVC for the first time.

More details are included in Issue #76038 .

Note this PR makes it possible to support `Z instrument-coverage` but
does not enable instrument coverage for MSVC in existing tests. It will be
enabled in another PR to follow this one (both PRs coming from original
PR #75828).

r? @tmandry
FYI: @wesleywiser

1  2 
compiler/rustc_middle/src/mir/mono.rs
compiler/rustc_mir/src/monomorphize/partitioning/mod.rs
compiler/rustc_session/src/options.rs
compiler/rustc_session/src/session.rs

Simple merge
Simple merge
Simple merge