mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Rename the asm-comments
compiler flag to verbose-asm
Since this codegen flag now only controls LLVM-generated comments rather than all assembly comments, make the name more accurate (and also match Clang).
This commit is contained in:
parent
64a3bd84d8
commit
c15a698f56
@ -32,7 +32,7 @@ impl OwnedTargetMachine {
|
||||
unique_section_names: bool,
|
||||
trap_unreachable: bool,
|
||||
singletree: bool,
|
||||
asm_comments: bool,
|
||||
verbose_asm: bool,
|
||||
emit_stack_size_section: bool,
|
||||
relax_elf_relocations: bool,
|
||||
use_init_array: bool,
|
||||
@ -64,7 +64,7 @@ impl OwnedTargetMachine {
|
||||
unique_section_names,
|
||||
trap_unreachable,
|
||||
singletree,
|
||||
asm_comments,
|
||||
verbose_asm,
|
||||
emit_stack_size_section,
|
||||
relax_elf_relocations,
|
||||
use_init_array,
|
||||
|
@ -214,7 +214,7 @@ pub fn target_machine_factory(
|
||||
sess.opts.unstable_opts.trap_unreachable.unwrap_or(sess.target.trap_unreachable);
|
||||
let emit_stack_size_section = sess.opts.unstable_opts.emit_stack_sizes;
|
||||
|
||||
let asm_comments = sess.opts.unstable_opts.asm_comments;
|
||||
let verbose_asm = sess.opts.unstable_opts.verbose_asm;
|
||||
let relax_elf_relocations =
|
||||
sess.opts.unstable_opts.relax_elf_relocations.unwrap_or(sess.target.relax_elf_relocations);
|
||||
|
||||
@ -289,7 +289,7 @@ pub fn target_machine_factory(
|
||||
funique_section_names,
|
||||
trap_unreachable,
|
||||
singlethread,
|
||||
asm_comments,
|
||||
verbose_asm,
|
||||
emit_stack_size_section,
|
||||
relax_elf_relocations,
|
||||
use_init_array,
|
||||
|
@ -2185,7 +2185,7 @@ extern "C" {
|
||||
UniqueSectionNames: bool,
|
||||
TrapUnreachable: bool,
|
||||
Singlethread: bool,
|
||||
AsmComments: bool,
|
||||
VerboseAsm: bool,
|
||||
EmitStackSizeSection: bool,
|
||||
RelaxELFRelocations: bool,
|
||||
UseInitArray: bool,
|
||||
|
@ -757,7 +757,6 @@ fn test_unstable_options_tracking_hash() {
|
||||
// tidy-alphabetical-start
|
||||
tracked!(allow_features, Some(vec![String::from("lang_items")]));
|
||||
tracked!(always_encode_mir, true);
|
||||
tracked!(asm_comments, true);
|
||||
tracked!(assume_incomplete_release, true);
|
||||
tracked!(binary_dep_depinfo, true);
|
||||
tracked!(box_noalias, false);
|
||||
@ -862,6 +861,7 @@ fn test_unstable_options_tracking_hash() {
|
||||
tracked!(uninit_const_chunk_threshold, 123);
|
||||
tracked!(unleash_the_miri_inside_of_you, true);
|
||||
tracked!(use_ctors_section, Some(true));
|
||||
tracked!(verbose_asm, true);
|
||||
tracked!(verify_llvm_ir, true);
|
||||
tracked!(virtual_function_elimination, true);
|
||||
tracked!(wasi_exec_model, Some(WasiExecModel::Reactor));
|
||||
|
@ -407,7 +407,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
||||
const char *ABIStr, LLVMRustCodeModel RustCM, LLVMRustRelocModel RustReloc,
|
||||
LLVMRustCodeGenOptLevel RustOptLevel, bool UseSoftFloat,
|
||||
bool FunctionSections, bool DataSections, bool UniqueSectionNames,
|
||||
bool TrapUnreachable, bool Singlethread, bool AsmComments,
|
||||
bool TrapUnreachable, bool Singlethread, bool VerboseAsm,
|
||||
bool EmitStackSizeSection, bool RelaxELFRelocations, bool UseInitArray,
|
||||
const char *SplitDwarfFile, const char *OutputObjFile,
|
||||
const char *DebugInfoCompression, bool UseEmulatedTls,
|
||||
@ -435,7 +435,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
||||
Options.DataSections = DataSections;
|
||||
Options.FunctionSections = FunctionSections;
|
||||
Options.UniqueSectionNames = UniqueSectionNames;
|
||||
Options.MCOptions.AsmVerbose = AsmComments;
|
||||
Options.MCOptions.AsmVerbose = VerboseAsm;
|
||||
// Always preserve comments that were written by the user
|
||||
Options.MCOptions.PreserveAsmComments = true;
|
||||
Options.MCOptions.ABIName = ABIStr;
|
||||
|
@ -1630,8 +1630,6 @@ options! {
|
||||
"only allow the listed language features to be enabled in code (comma separated)"),
|
||||
always_encode_mir: bool = (false, parse_bool, [TRACKED],
|
||||
"encode MIR of all functions into the crate metadata (default: no)"),
|
||||
asm_comments: bool = (false, parse_bool, [TRACKED],
|
||||
"generate comments into the assembly (may change behavior) (default: no)"),
|
||||
assert_incr_state: Option<String> = (None, parse_opt_string, [UNTRACKED],
|
||||
"assert that the incremental cache is in given state: \
|
||||
either `loaded` or `not-loaded`."),
|
||||
@ -2107,6 +2105,8 @@ written to standard error output)"),
|
||||
"Generate sync unwind tables instead of async unwind tables (default: no)"),
|
||||
validate_mir: bool = (false, parse_bool, [UNTRACKED],
|
||||
"validate MIR after each transformation"),
|
||||
verbose_asm: bool = (false, parse_bool, [TRACKED],
|
||||
"add descriptive comments from LLVM to the assembly (may change behavior) (default: no)"),
|
||||
#[rustc_lint_opt_deny_field_access("use `Session::verbose_internals` instead of this field")]
|
||||
verbose_internals: bool = (false, parse_bool, [TRACKED_NO_CRATE_HASH],
|
||||
"in general, enable more debug printouts (default: no)"),
|
||||
|
Loading…
Reference in New Issue
Block a user