diff options
| author | Jeremy Fitzhardinge <jsgf@fb.com> | 2021-06-09 16:51:58 -0700 |
|---|---|---|
| committer | Jeremy Fitzhardinge <jsgf@fb.com> | 2021-06-21 17:22:35 -0700 |
| commit | f1f7f2f508b78defcf9f22f1c35342c27765a1f0 (patch) | |
| tree | cee9512e8c1ca07c2c462afab1db33d4566a8ed7 /compiler | |
| parent | 48921ce30095bcc356f2fe082e29edb004d1eda9 (diff) | |
| download | rust-f1f7f2f508b78defcf9f22f1c35342c27765a1f0.tar.gz rust-f1f7f2f508b78defcf9f22f1c35342c27765a1f0.zip | |
make -Zno-codegen TRACKED_NO_CRATE_HASH
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index c210865a4ad..26a7dd0745c 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -720,7 +720,6 @@ fn test_debugging_options_tracking_hash() { tracked!(mir_opt_level, Some(4)); tracked!(mutable_noalias, Some(true)); tracked!(new_llvm_pass_manager, Some(true)); - tracked!(no_codegen, true); tracked!(no_generate_arange_section, true); tracked!(no_link, true); tracked!(osx_rpath_install_name, true); @@ -755,6 +754,16 @@ fn test_debugging_options_tracking_hash() { tracked!(use_ctors_section, Some(true)); tracked!(verify_llvm_ir, true); tracked!(wasi_exec_model, Some(WasiExecModel::Reactor)); + + macro_rules! tracked_no_crate_hash { + ($name: ident, $non_default_value: expr) => { + opts = reference.clone(); + assert_ne!(opts.debugging_opts.$name, $non_default_value); + opts.debugging_opts.$name = $non_default_value; + assert_non_crate_hash_different(&reference, &opts); + }; + } + tracked_no_crate_hash!(no_codegen, true); } #[test] diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index ebf59bb4cc6..51bf1710db0 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1148,7 +1148,7 @@ options! { "the directory the NLL facts are dumped into (default: `nll-facts`)"), no_analysis: bool = (false, parse_no_flag, [UNTRACKED], "parse and expand the source, but run no analysis"), - no_codegen: bool = (false, parse_no_flag, [TRACKED], + no_codegen: bool = (false, parse_no_flag, [TRACKED_NO_CRATE_HASH], "run all passes except codegen; no output"), no_generate_arange_section: bool = (false, parse_no_flag, [TRACKED], "omit DWARF address ranges that give faster lookups"), |
