rustup update

This commit is contained in:
khyperia 2020-10-16 08:25:04 +02:00
parent 77e2914c21
commit f8c669f536
3 changed files with 7 additions and 5 deletions

View File

@ -15,11 +15,13 @@ use rustc_target::abi::LayoutOf;
fn int_type_width_signed(ty: Ty<'_>, cx: &CodegenCx<'_>) -> Option<(u64, bool)> {
match ty.kind() {
TyKind::Int(t) => Some((
t.bit_width().unwrap_or(cx.tcx.sess.target.ptr_width as u64),
t.bit_width()
.unwrap_or(cx.tcx.sess.target.pointer_width as u64),
true,
)),
TyKind::Uint(t) => Some((
t.bit_width().unwrap_or(cx.tcx.sess.target.ptr_width as u64),
t.bit_width()
.unwrap_or(cx.tcx.sess.target.pointer_width as u64),
false,
)),
_ => None,

View File

@ -220,7 +220,7 @@ impl<'tcx> HasDataLayout for CodegenCx<'tcx> {
impl<'tcx> HasTargetSpec for CodegenCx<'tcx> {
fn target_spec(&self) -> &Target {
&self.tcx.sess.target.target
&self.tcx.sess.target
}
}

View File

@ -93,7 +93,7 @@ fn target_options() -> Target {
Target {
llvm_target: "no-llvm".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
pointer_width: 32,
target_c_int_width: "32".to_string(),
target_os: "unknown".to_string(),
target_env: String::new(),
@ -168,7 +168,7 @@ impl CodegenBackend for SpirvCodegenBackend {
fn target_features(&self, sess: &Session) -> Vec<Symbol> {
let cmdline = sess.opts.cg.target_feature.split(',');
let cfg = sess.target.target.options.features.split(',');
let cfg = sess.target.options.features.split(',');
cfg.chain(cmdline)
.filter(|l| l.starts_with('+'))
.map(|l| &l[1..])