diff options
| author | Rich Kadel <richkadel@google.com> | 2020-08-27 12:53:43 -0700 |
|---|---|---|
| committer | Rich Kadel <richkadel@google.com> | 2020-08-31 18:41:13 -0700 |
| commit | ddb054aee898dd74261fa8f50fe0c6541e5ceaf3 (patch) | |
| tree | a5d8f94dec6ae400ecebc76c50eae8b992152642 /compiler/rustc_session/src/options.rs | |
| parent | 85fbf49ce0e2274d0acf798f6e703747674feec3 (diff) | |
| download | rust-ddb054aee898dd74261fa8f50fe0c6541e5ceaf3.tar.gz rust-ddb054aee898dd74261fa8f50fe0c6541e5ceaf3.zip | |
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. (This PR was broken out from PR #75828)
Diffstat (limited to 'compiler/rustc_session/src/options.rs')
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index d05f1a3f34b..988d3d39bd5 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -885,9 +885,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "instrument the generated code to support LLVM source-based code coverage \ reports (note, the compiler build config must include `profiler = true`, \ and is mutually exclusive with `-C profile-generate`/`-C profile-use`); \ - implies `-C link-dead-code` (unless explicitly disabled)` and \ - `-Z symbol-mangling-version=v0`; and disables/overrides some optimization \ - options (default: no)"), + implies `-C link-dead-code` (unless targeting MSVC, or explicitly disabled) \ + and `-Z symbol-mangling-version=v0`; disables/overrides some Rust \ + optimizations (default: no)"), instrument_mcount: bool = (false, parse_bool, [TRACKED], "insert function instrument code for mcount-based tracing (default: no)"), keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED], |
