Replace target.target with target and target.ptr_width with target.pointer_width
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
This commit is contained in:
parent
0d1aa1e034
commit
4fa5578774
50 changed files with 224 additions and 240 deletions
|
@ -206,7 +206,7 @@ impl<'a> LlvmArchiveBuilder<'a> {
|
|||
}
|
||||
|
||||
fn llvm_archive_kind(&self) -> Result<ArchiveKind, &str> {
|
||||
let kind = &*self.config.sess.target.target.options.archive_format;
|
||||
let kind = &*self.config.sess.target.options.archive_format;
|
||||
kind.parse().map_err(|_| kind)
|
||||
}
|
||||
|
||||
|
|
|
@ -128,40 +128,40 @@ pub fn target_machine_factory(
|
|||
let (opt_level, _) = to_llvm_opt_settings(optlvl);
|
||||
let use_softfp = sess.opts.cg.soft_float;
|
||||
|
||||
let ffunction_sections = sess.target.target.options.function_sections;
|
||||
let ffunction_sections = sess.target.options.function_sections;
|
||||
let fdata_sections = ffunction_sections;
|
||||
|
||||
let code_model = to_llvm_code_model(sess.code_model());
|
||||
|
||||
let features = attributes::llvm_target_features(sess).collect::<Vec<_>>();
|
||||
let mut singlethread = sess.target.target.options.singlethread;
|
||||
let mut singlethread = sess.target.options.singlethread;
|
||||
|
||||
// On the wasm target once the `atomics` feature is enabled that means that
|
||||
// we're no longer single-threaded, or otherwise we don't want LLVM to
|
||||
// lower atomic operations to single-threaded operations.
|
||||
if singlethread
|
||||
&& sess.target.target.llvm_target.contains("wasm32")
|
||||
&& sess.target.llvm_target.contains("wasm32")
|
||||
&& sess.target_features.contains(&sym::atomics)
|
||||
{
|
||||
singlethread = false;
|
||||
}
|
||||
|
||||
let triple = SmallCStr::new(&sess.target.target.llvm_target);
|
||||
let triple = SmallCStr::new(&sess.target.llvm_target);
|
||||
let cpu = SmallCStr::new(llvm_util::target_cpu(sess));
|
||||
let features = features.join(",");
|
||||
let features = CString::new(features).unwrap();
|
||||
let abi = SmallCStr::new(&sess.target.target.options.llvm_abiname);
|
||||
let trap_unreachable = sess.target.target.options.trap_unreachable;
|
||||
let abi = SmallCStr::new(&sess.target.options.llvm_abiname);
|
||||
let trap_unreachable = sess.target.options.trap_unreachable;
|
||||
let emit_stack_size_section = sess.opts.debugging_opts.emit_stack_sizes;
|
||||
|
||||
let asm_comments = sess.asm_comments();
|
||||
let relax_elf_relocations = sess.target.target.options.relax_elf_relocations;
|
||||
let relax_elf_relocations = sess.target.options.relax_elf_relocations;
|
||||
|
||||
let use_init_array = !sess
|
||||
.opts
|
||||
.debugging_opts
|
||||
.use_ctors_section
|
||||
.unwrap_or(sess.target.target.options.use_ctors_section);
|
||||
.unwrap_or(sess.target.options.use_ctors_section);
|
||||
|
||||
Arc::new(move || {
|
||||
let tm = unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue