Update to nightly-2023-08-12

This commit is contained in:
Antoni Boucher 2023-08-13 09:37:32 -04:00
parent 8a160d6fcd
commit 43431e4db4
9 changed files with 13 additions and 14 deletions

4
Cargo.lock generated
View File

@ -35,7 +35,7 @@ dependencies = [
[[package]] [[package]]
name = "gccjit" name = "gccjit"
version = "1.0.0" version = "1.0.0"
source = "git+https://github.com/antoyo/gccjit.rs#d6e52626cfc6f487094a5d5ac66302baf3439984" source = "git+https://github.com/antoyo/gccjit.rs#814eea1a0a098d08a113794225cad301622fd7b4"
dependencies = [ dependencies = [
"gccjit_sys", "gccjit_sys",
] ]
@ -43,7 +43,7 @@ dependencies = [
[[package]] [[package]]
name = "gccjit_sys" name = "gccjit_sys"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/antoyo/gccjit.rs#d6e52626cfc6f487094a5d5ac66302baf3439984" source = "git+https://github.com/antoyo/gccjit.rs#814eea1a0a098d08a113794225cad301622fd7b4"
dependencies = [ dependencies = [
"libc", "libc",
] ]

View File

@ -2,6 +2,7 @@
authors = ["bjorn3 <bjorn3@users.noreply.github.com>"] authors = ["bjorn3 <bjorn3@users.noreply.github.com>"]
name = "sysroot" name = "sysroot"
version = "0.0.0" version = "0.0.0"
resolver = "2"
[dependencies] [dependencies]
core = { path = "./sysroot_src/library/core" } core = { path = "./sysroot_src/library/core" }

View File

@ -1,5 +1,6 @@
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)] #![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
#![no_std] #![no_std]
#![allow(internal_features)]
extern crate alloc; extern crate alloc;
extern crate alloc_system; extern crate alloc_system;

View File

@ -2,6 +2,7 @@
#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)] #![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![allow(internal_features)]
use std::{ use std::{
ops::{Deref, CoerceUnsized, DispatchFromDyn}, ops::{Deref, CoerceUnsized, DispatchFromDyn},

View File

@ -4,7 +4,7 @@
thread_local thread_local
)] )]
#![no_core] #![no_core]
#![allow(dead_code)] #![allow(dead_code, internal_features)]
#[no_mangle] #[no_mangle]
unsafe extern "C" fn _Unwind_Resume() { unsafe extern "C" fn _Unwind_Resume() {

View File

@ -5,7 +5,7 @@
extern_types, thread_local extern_types, thread_local
)] )]
#![no_core] #![no_core]
#![allow(dead_code, non_camel_case_types)] #![allow(dead_code, internal_features, non_camel_case_types)]
extern crate mini_core; extern crate mini_core;

View File

@ -1,5 +1,6 @@
#![feature(start, core_intrinsics, lang_items)] #![feature(start, core_intrinsics, lang_items)]
#![no_std] #![no_std]
#![allow(internal_features)]
#[link(name = "c")] #[link(name = "c")]
extern {} extern {}

View File

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "nightly-2023-06-19" channel = "nightly-2023-08-12"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"] components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

View File

@ -247,16 +247,9 @@ fn check_ptr_call<'b>(&mut self, _typ: &str, func_ptr: RValue<'gcc>, args: &'b [
} }
fn check_store(&mut self, val: RValue<'gcc>, ptr: RValue<'gcc>) -> RValue<'gcc> { fn check_store(&mut self, val: RValue<'gcc>, ptr: RValue<'gcc>) -> RValue<'gcc> {
let dest_ptr_ty = self.cx.val_ty(ptr).make_pointer(); // TODO(antoyo): make sure make_pointer() is okay here.
let stored_ty = self.cx.val_ty(val); let stored_ty = self.cx.val_ty(val);
let stored_ptr_ty = self.cx.type_ptr_to(stored_ty); let stored_ptr_ty = self.cx.type_ptr_to(stored_ty);
self.bitcast(ptr, stored_ptr_ty)
if dest_ptr_ty == stored_ptr_ty {
ptr
}
else {
self.bitcast(ptr, stored_ptr_ty)
}
} }
pub fn current_func(&self) -> Function<'gcc> { pub fn current_func(&self) -> Function<'gcc> {
@ -916,7 +909,9 @@ fn atomic_store(&mut self, value: RValue<'gcc>, ptr: RValue<'gcc>, order: Atomic
.add_eval(None, self.context.new_call(None, atomic_store, &[ptr, value, ordering])); .add_eval(None, self.context.new_call(None, atomic_store, &[ptr, value, ordering]));
} }
fn gep(&mut self, _typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> { fn gep(&mut self, typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> {
// NOTE: due to opaque pointers now being used, we need to cast here.
let ptr = self.context.new_cast(None, ptr, typ.make_pointer());
let ptr_type = ptr.get_type(); let ptr_type = ptr.get_type();
let mut pointee_type = ptr.get_type(); let mut pointee_type = ptr.get_type();
// NOTE: we cannot use array indexing here like in inbounds_gep because array indexing is // NOTE: we cannot use array indexing here like in inbounds_gep because array indexing is