Skip to content

Commit 82cea89

Browse files
authored
Remove the compiler_builtins dependency. (#164)
* Remove the compiler_builtins dependency. This also regenerates the bindings, which fixes some issues with the sequencing of the recent PR merges. Fixes #157. * Update to bindgen 0.72. * Run bindgen with a clang-22.
1 parent 47e68ac commit 82cea89

File tree

363 files changed

+620
-603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+620
-603
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ rust-version = "1.63"
1414

1515
[dependencies]
1616
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
17-
compiler_builtins = { version = '0.1.49', optional = true }
1817

1918
[dev-dependencies]
2019
static_assertions = "1.1.0"
@@ -56,4 +55,4 @@ default = ["std", "general", "errno"]
5655
std = []
5756
no_std = []
5857
elf = []
59-
rustc-dep-of-std = ["core", "compiler_builtins", "no_std"]
58+
rustc-dep-of-std = ["core", "no_std"]

gen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ edition = "2021"
55
publish = false
66

77
[dependencies]
8-
bindgen = { version = "0.71.1", default-features = false }
8+
bindgen = { version = "0.72.1", default-features = false }
99
tempfile = "3.16.0"

gen/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn main() {
176176
writeln!(cargo_toml, "elf = []").unwrap();
177177
writeln!(
178178
cargo_toml,
179-
"rustc-dep-of-std = [\"core\", \"compiler_builtins\", \"no_std\"]"
179+
"rustc-dep-of-std = [\"core\", \"no_std\"]"
180180
)
181181
.unwrap();
182182

src/aarch64/bootparam.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33

src/aarch64/btrfs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub type __s8 = crate::ctypes::c_schar;
44
pub type __u8 = crate::ctypes::c_uchar;
@@ -716,7 +716,7 @@ pub dirid: __u64,
716716
#[repr(C)]
717717
#[derive(Debug, Copy, Clone)]
718718
pub struct btrfs_ioctl_encoded_io_args {
719-
pub iov: *mut iovec,
719+
pub iov: *const iovec,
720720
pub iovcnt: crate::ctypes::c_ulong,
721721
pub offset: __s64,
722722
pub flags: __u64,

src/aarch64/elf_uapi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub type __s8 = crate::ctypes::c_schar;
44
pub type __u8 = crate::ctypes::c_uchar;

src/aarch64/errno.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub const EPERM: u32 = 1;
44
pub const ENOENT: u32 = 2;

src/aarch64/general.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub type __s8 = crate::ctypes::c_schar;
44
pub type __u8 = crate::ctypes::c_uchar;
@@ -2937,7 +2937,7 @@ Self::extract_bit(byte, index)
29372937
pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
29382938
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
29392939
let byte_index = index / 8;
2940-
let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize);
2940+
let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) };
29412941
Self::extract_bit(byte, index)
29422942
}
29432943
#[inline]
@@ -2961,8 +2961,8 @@ let byte = &mut self.storage.as_mut()[byte_index];
29612961
pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
29622962
debug_assert!(index / 8 < core::mem::size_of::<Storage>());
29632963
let byte_index = index / 8;
2964-
let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize);
2965-
*byte = Self::change_bit(*byte, index, val);
2964+
let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) };
2965+
unsafe { *byte = Self::change_bit(*byte, index, val) };
29662966
}
29672967
#[inline]
29682968
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
@@ -2985,7 +2985,7 @@ debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
29852985
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
29862986
let mut val = 0;
29872987
for i in 0..(bit_width as usize) {
2988-
if Self::raw_get_bit(this, i + bit_offset) {
2988+
if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
29892989
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
29902990
val |= 1 << index;
29912991
}
@@ -3013,7 +3013,7 @@ for i in 0..(bit_width as usize) {
30133013
let mask = 1 << i;
30143014
let val_bit_is_set = val & mask == mask;
30153015
let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i };
3016-
Self::raw_set_bit(this, index + bit_offset, val_bit_is_set);
3016+
unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
30173017
}
30183018
}
30193019
}

src/aarch64/if_arp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub type __s8 = crate::ctypes::c_schar;
44
pub type __u8 = crate::ctypes::c_uchar;

src/aarch64/if_ether.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* automatically generated by rust-bindgen 0.71.1 */
1+
/* automatically generated by rust-bindgen 0.72.1 */
22

33
pub type __s8 = crate::ctypes::c_schar;
44
pub type __u8 = crate::ctypes::c_uchar;

0 commit comments

Comments
 (0)