mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 08:14:12 +00:00
rustup update
This commit is contained in:
parent
77e2914c21
commit
f8c669f536
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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..])
|
||||
|
Loading…
Reference in New Issue
Block a user