mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Auto merge of #122602 - ChrisDenton:rollup-f0vumtg, r=ChrisDenton
Rollup of 7 pull requests Successful merges: - #122323 (configure.py: add flag for loongarch64 musl-root) - #122372 (prevent notifying the same changes more than once) - #122390 (Bump windows-bindgen to 0.55.0) - #122401 (Check library crates for all tier 1 targets in PR CI) - #122489 (Bump `cargo update` PR more often) - #122583 (Use `UnsafeCell` for fast constant thread locals) - #122590 (bootstrap: Don't name things copy that are not copies) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
@@ -6,6 +6,8 @@ on:
|
||||
schedule:
|
||||
# Run weekly
|
||||
- cron: '0 0 * * Sun'
|
||||
# Re-bump deps every 4 hours
|
||||
- cron: '0 */4 * * *'
|
||||
workflow_dispatch:
|
||||
# Needed so we can run it manually
|
||||
permissions:
|
||||
@@ -135,8 +137,8 @@ jobs:
|
||||
gh pr edit cargo_update --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
|
||||
|
||||
- name: open new pull request
|
||||
# Only run if there wasn't an existing PR
|
||||
if: steps.edit.outcome != 'success'
|
||||
# Only run if there wasn't an existing PR and if this is the weekly run
|
||||
if: steps.edit.outcome != 'success' && github.event.schedule == '0 0 * * Sun'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh pr create --title "${PR_TITLE}" --body-file body.md --repo $GITHUB_REPOSITORY
|
||||
|
||||
+6
-4
@@ -6280,12 +6280,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-bindgen"
|
||||
version = "0.52.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "970efb0b6849eb8a87a898f586af7cc167567b070014c7434514c0bde0ca341c"
|
||||
checksum = "073ff8a486ebad239d557809d2cd5fe5e04ee1de29e09c6cd83fb0bae19b8a4c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"rayon",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"syn 2.0.52",
|
||||
"windows-metadata",
|
||||
]
|
||||
@@ -6301,9 +6303,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-metadata"
|
||||
version = "0.52.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "218fd59201e26acdbb894fa2b302d1de84bf3eec7d0eb894ac8e9c5a854ee4ef"
|
||||
checksum = "b602635050172a1fc57a35040d4d225baefc6098fefd97094919921d95961a7d"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
|
||||
@@ -1782,6 +1782,7 @@ fn windows_unix_socket_exists() {
|
||||
}
|
||||
let mut addr = c::SOCKADDR_UN { sun_family: c::AF_UNIX, sun_path: mem::zeroed() };
|
||||
let bytes = socket_path.as_os_str().as_encoded_bytes();
|
||||
let bytes = core::slice::from_raw_parts(bytes.as_ptr().cast::<i8>(), bytes.len());
|
||||
addr.sun_path[..bytes.len()].copy_from_slice(bytes);
|
||||
let len = mem::size_of_val(&addr) as i32;
|
||||
let result = c::bind(socket, ptr::addr_of!(addr).cast::<c::SOCKADDR>(), len);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Bindings generated by `windows-bindgen` 0.52.0
|
||||
// Bindings generated by `windows-bindgen` 0.55.0
|
||||
|
||||
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, clippy::all)]
|
||||
#[link(name = "advapi32")]
|
||||
@@ -12,16 +12,15 @@ pub fn OpenProcessToken(
|
||||
#[link(name = "advapi32")]
|
||||
extern "system" {
|
||||
#[link_name = "SystemFunction036"]
|
||||
pub fn RtlGenRandom(randombuffer: *mut ::core::ffi::c_void, randombufferlength: u32)
|
||||
-> BOOLEAN;
|
||||
pub fn RtlGenRandom(randombuffer: *mut core::ffi::c_void, randombufferlength: u32) -> BOOLEAN;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn AcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> ();
|
||||
pub fn AcquireSRWLockExclusive(srwlock: *mut SRWLOCK);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn AcquireSRWLockShared(srwlock: *mut SRWLOCK) -> ();
|
||||
pub fn AcquireSRWLockShared(srwlock: *mut SRWLOCK);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -47,7 +46,7 @@ pub fn CopyFileExW(
|
||||
lpexistingfilename: PCWSTR,
|
||||
lpnewfilename: PCWSTR,
|
||||
lpprogressroutine: LPPROGRESS_ROUTINE,
|
||||
lpdata: *const ::core::ffi::c_void,
|
||||
lpdata: *const core::ffi::c_void,
|
||||
pbcancel: *mut BOOL,
|
||||
dwcopyflags: u32,
|
||||
) -> BOOL;
|
||||
@@ -110,7 +109,7 @@ pub fn CreateProcessW(
|
||||
lpthreadattributes: *const SECURITY_ATTRIBUTES,
|
||||
binherithandles: BOOL,
|
||||
dwcreationflags: PROCESS_CREATION_FLAGS,
|
||||
lpenvironment: *const ::core::ffi::c_void,
|
||||
lpenvironment: *const core::ffi::c_void,
|
||||
lpcurrentdirectory: PCWSTR,
|
||||
lpstartupinfo: *const STARTUPINFOW,
|
||||
lpprocessinformation: *mut PROCESS_INFORMATION,
|
||||
@@ -130,7 +129,7 @@ pub fn CreateThread(
|
||||
lpthreadattributes: *const SECURITY_ATTRIBUTES,
|
||||
dwstacksize: usize,
|
||||
lpstartaddress: LPTHREAD_START_ROUTINE,
|
||||
lpparameter: *const ::core::ffi::c_void,
|
||||
lpparameter: *const core::ffi::c_void,
|
||||
dwcreationflags: THREAD_CREATION_FLAGS,
|
||||
lpthreadid: *mut u32,
|
||||
) -> HANDLE;
|
||||
@@ -150,16 +149,16 @@ pub fn CreateWaitableTimerExW(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn DeleteProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST) -> ();
|
||||
pub fn DeleteProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn DeviceIoControl(
|
||||
hdevice: HANDLE,
|
||||
dwiocontrolcode: u32,
|
||||
lpinbuffer: *const ::core::ffi::c_void,
|
||||
lpinbuffer: *const core::ffi::c_void,
|
||||
ninbuffersize: u32,
|
||||
lpoutbuffer: *mut ::core::ffi::c_void,
|
||||
lpoutbuffer: *mut core::ffi::c_void,
|
||||
noutbuffersize: u32,
|
||||
lpbytesreturned: *mut u32,
|
||||
lpoverlapped: *mut OVERLAPPED,
|
||||
@@ -201,7 +200,7 @@ pub fn DuplicateHandle(
|
||||
extern "system" {
|
||||
pub fn FormatMessageW(
|
||||
dwflags: FORMAT_MESSAGE_OPTIONS,
|
||||
lpsource: *const ::core::ffi::c_void,
|
||||
lpsource: *const core::ffi::c_void,
|
||||
dwmessageid: u32,
|
||||
dwlanguageid: u32,
|
||||
lpbuffer: PWSTR,
|
||||
@@ -269,7 +268,7 @@ pub fn GetFileInformationByHandle(
|
||||
pub fn GetFileInformationByHandleEx(
|
||||
hfile: HANDLE,
|
||||
fileinformationclass: FILE_INFO_BY_HANDLE_CLASS,
|
||||
lpfileinformation: *mut ::core::ffi::c_void,
|
||||
lpfileinformation: *mut core::ffi::c_void,
|
||||
dwbuffersize: u32,
|
||||
) -> BOOL;
|
||||
}
|
||||
@@ -338,11 +337,11 @@ pub fn GetOverlappedResult(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn GetSystemInfo(lpsysteminfo: *mut SYSTEM_INFO) -> ();
|
||||
pub fn GetSystemInfo(lpsysteminfo: *mut SYSTEM_INFO);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn GetSystemTimeAsFileTime(lpsystemtimeasfiletime: *mut FILETIME) -> ();
|
||||
pub fn GetSystemTimeAsFileTime(lpsystemtimeasfiletime: *mut FILETIME);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -362,7 +361,7 @@ pub fn InitOnceBeginInitialize(
|
||||
lpinitonce: *mut INIT_ONCE,
|
||||
dwflags: u32,
|
||||
fpending: *mut BOOL,
|
||||
lpcontext: *mut *mut ::core::ffi::c_void,
|
||||
lpcontext: *mut *mut core::ffi::c_void,
|
||||
) -> BOOL;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
@@ -370,7 +369,7 @@ pub fn InitOnceBeginInitialize(
|
||||
pub fn InitOnceComplete(
|
||||
lpinitonce: *mut INIT_ONCE,
|
||||
dwflags: u32,
|
||||
lpcontext: *const ::core::ffi::c_void,
|
||||
lpcontext: *const core::ffi::c_void,
|
||||
) -> BOOL;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
@@ -417,7 +416,7 @@ pub fn MultiByteToWideChar(
|
||||
extern "system" {
|
||||
pub fn ReadConsoleW(
|
||||
hconsoleinput: HANDLE,
|
||||
lpbuffer: *mut ::core::ffi::c_void,
|
||||
lpbuffer: *mut core::ffi::c_void,
|
||||
nnumberofcharstoread: u32,
|
||||
lpnumberofcharsread: *mut u32,
|
||||
pinputcontrol: *const CONSOLE_READCONSOLE_CONTROL,
|
||||
@@ -445,11 +444,11 @@ pub fn ReadFileEx(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK) -> ();
|
||||
pub fn ReleaseSRWLockExclusive(srwlock: *mut SRWLOCK);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK) -> ();
|
||||
pub fn ReleaseSRWLockShared(srwlock: *mut SRWLOCK);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -475,7 +474,7 @@ pub fn SetFileAttributesW(
|
||||
pub fn SetFileInformationByHandle(
|
||||
hfile: HANDLE,
|
||||
fileinformationclass: FILE_INFO_BY_HANDLE_CLASS,
|
||||
lpfileinformation: *const ::core::ffi::c_void,
|
||||
lpfileinformation: *const core::ffi::c_void,
|
||||
dwbuffersize: u32,
|
||||
) -> BOOL;
|
||||
}
|
||||
@@ -503,7 +502,7 @@ pub fn SetFileTime(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn SetLastError(dwerrcode: WIN32_ERROR) -> ();
|
||||
pub fn SetLastError(dwerrcode: WIN32_ERROR);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -516,13 +515,13 @@ pub fn SetWaitableTimer(
|
||||
lpduetime: *const i64,
|
||||
lperiod: i32,
|
||||
pfncompletionroutine: PTIMERAPCROUTINE,
|
||||
lpargtocompletionroutine: *const ::core::ffi::c_void,
|
||||
lpargtocompletionroutine: *const core::ffi::c_void,
|
||||
fresume: BOOL,
|
||||
) -> BOOL;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn Sleep(dwmilliseconds: u32) -> ();
|
||||
pub fn Sleep(dwmilliseconds: u32);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -555,11 +554,11 @@ pub fn SleepConditionVariableSRW(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn TlsGetValue(dwtlsindex: u32) -> *mut ::core::ffi::c_void;
|
||||
pub fn TlsGetValue(dwtlsindex: u32) -> *mut core::ffi::c_void;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn TlsSetValue(dwtlsindex: u32, lptlsvalue: *const ::core::ffi::c_void) -> BOOL;
|
||||
pub fn TlsSetValue(dwtlsindex: u32, lptlsvalue: *const core::ffi::c_void) -> BOOL;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -575,9 +574,9 @@ pub fn UpdateProcThreadAttribute(
|
||||
lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST,
|
||||
dwflags: u32,
|
||||
attribute: usize,
|
||||
lpvalue: *const ::core::ffi::c_void,
|
||||
lpvalue: *const core::ffi::c_void,
|
||||
cbsize: usize,
|
||||
lppreviousvalue: *mut ::core::ffi::c_void,
|
||||
lppreviousvalue: *mut core::ffi::c_void,
|
||||
lpreturnsize: *const usize,
|
||||
) -> BOOL;
|
||||
}
|
||||
@@ -596,11 +595,11 @@ pub fn WaitForMultipleObjects(
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn WakeAllConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) -> ();
|
||||
pub fn WakeAllConditionVariable(conditionvariable: *mut CONDITION_VARIABLE);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
pub fn WakeConditionVariable(conditionvariable: *mut CONDITION_VARIABLE) -> ();
|
||||
pub fn WakeConditionVariable(conditionvariable: *mut CONDITION_VARIABLE);
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
extern "system" {
|
||||
@@ -619,10 +618,10 @@ pub fn WideCharToMultiByte(
|
||||
extern "system" {
|
||||
pub fn WriteConsoleW(
|
||||
hconsoleoutput: HANDLE,
|
||||
lpbuffer: *const ::core::ffi::c_void,
|
||||
lpbuffer: *const core::ffi::c_void,
|
||||
nnumberofcharstowrite: u32,
|
||||
lpnumberofcharswritten: *mut u32,
|
||||
lpreserved: *const ::core::ffi::c_void,
|
||||
lpreserved: *const core::ffi::c_void,
|
||||
) -> BOOL;
|
||||
}
|
||||
#[link(name = "kernel32")]
|
||||
@@ -647,7 +646,7 @@ pub fn NtCreateFile(
|
||||
shareaccess: FILE_SHARE_MODE,
|
||||
createdisposition: NTCREATEFILE_CREATE_DISPOSITION,
|
||||
createoptions: NTCREATEFILE_CREATE_OPTIONS,
|
||||
eabuffer: *const ::core::ffi::c_void,
|
||||
eabuffer: *const core::ffi::c_void,
|
||||
ealength: u32,
|
||||
) -> NTSTATUS;
|
||||
}
|
||||
@@ -657,9 +656,9 @@ pub fn NtReadFile(
|
||||
filehandle: HANDLE,
|
||||
event: HANDLE,
|
||||
apcroutine: PIO_APC_ROUTINE,
|
||||
apccontext: *const ::core::ffi::c_void,
|
||||
apccontext: *const core::ffi::c_void,
|
||||
iostatusblock: *mut IO_STATUS_BLOCK,
|
||||
buffer: *mut ::core::ffi::c_void,
|
||||
buffer: *mut core::ffi::c_void,
|
||||
length: u32,
|
||||
byteoffset: *const i64,
|
||||
key: *const u32,
|
||||
@@ -671,9 +670,9 @@ pub fn NtWriteFile(
|
||||
filehandle: HANDLE,
|
||||
event: HANDLE,
|
||||
apcroutine: PIO_APC_ROUTINE,
|
||||
apccontext: *const ::core::ffi::c_void,
|
||||
apccontext: *const core::ffi::c_void,
|
||||
iostatusblock: *mut IO_STATUS_BLOCK,
|
||||
buffer: *const ::core::ffi::c_void,
|
||||
buffer: *const core::ffi::c_void,
|
||||
length: u32,
|
||||
byteoffset: *const i64,
|
||||
key: *const u32,
|
||||
@@ -760,7 +759,7 @@ pub fn WSASocketW(
|
||||
}
|
||||
#[link(name = "ws2_32")]
|
||||
extern "system" {
|
||||
pub fn freeaddrinfo(paddrinfo: *const ADDRINFOA) -> ();
|
||||
pub fn freeaddrinfo(paddrinfo: *const ADDRINFOA);
|
||||
}
|
||||
#[link(name = "ws2_32")]
|
||||
extern "system" {
|
||||
@@ -852,8 +851,8 @@ pub struct ADDRINFOA {
|
||||
pub ai_addr: *mut SOCKADDR,
|
||||
pub ai_next: *mut ADDRINFOA,
|
||||
}
|
||||
impl ::core::marker::Copy for ADDRINFOA {}
|
||||
impl ::core::clone::Clone for ADDRINFOA {
|
||||
impl Copy for ADDRINFOA {}
|
||||
impl Clone for ADDRINFOA {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -871,8 +870,8 @@ pub union ARM64_NT_NEON128 {
|
||||
pub H: [u16; 8],
|
||||
pub B: [u8; 16],
|
||||
}
|
||||
impl ::core::marker::Copy for ARM64_NT_NEON128 {}
|
||||
impl ::core::clone::Clone for ARM64_NT_NEON128 {
|
||||
impl Copy for ARM64_NT_NEON128 {}
|
||||
impl Clone for ARM64_NT_NEON128 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -882,8 +881,8 @@ pub struct ARM64_NT_NEON128_0 {
|
||||
pub Low: u64,
|
||||
pub High: i64,
|
||||
}
|
||||
impl ::core::marker::Copy for ARM64_NT_NEON128_0 {}
|
||||
impl ::core::clone::Clone for ARM64_NT_NEON128_0 {
|
||||
impl Copy for ARM64_NT_NEON128_0 {}
|
||||
impl Clone for ARM64_NT_NEON128_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -904,8 +903,8 @@ pub struct BY_HANDLE_FILE_INFORMATION {
|
||||
pub nFileIndexHigh: u32,
|
||||
pub nFileIndexLow: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for BY_HANDLE_FILE_INFORMATION {}
|
||||
impl ::core::clone::Clone for BY_HANDLE_FILE_INFORMATION {
|
||||
impl Copy for BY_HANDLE_FILE_INFORMATION {}
|
||||
impl Clone for BY_HANDLE_FILE_INFORMATION {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -915,10 +914,10 @@ fn clone(&self) -> Self {
|
||||
pub type COMPARESTRING_RESULT = i32;
|
||||
#[repr(C)]
|
||||
pub struct CONDITION_VARIABLE {
|
||||
pub Ptr: *mut ::core::ffi::c_void,
|
||||
pub Ptr: *mut core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for CONDITION_VARIABLE {}
|
||||
impl ::core::clone::Clone for CONDITION_VARIABLE {
|
||||
impl Copy for CONDITION_VARIABLE {}
|
||||
impl Clone for CONDITION_VARIABLE {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -931,8 +930,8 @@ pub struct CONSOLE_READCONSOLE_CONTROL {
|
||||
pub dwCtrlWakeupMask: u32,
|
||||
pub dwControlKeyState: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for CONSOLE_READCONSOLE_CONTROL {}
|
||||
impl ::core::clone::Clone for CONSOLE_READCONSOLE_CONTROL {
|
||||
impl Copy for CONSOLE_READCONSOLE_CONTROL {}
|
||||
impl Clone for CONSOLE_READCONSOLE_CONTROL {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -954,9 +953,9 @@ pub struct CONTEXT {
|
||||
pub Wvr: [u64; 2],
|
||||
}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::marker::Copy for CONTEXT {}
|
||||
impl Copy for CONTEXT {}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::clone::Clone for CONTEXT {
|
||||
impl Clone for CONTEXT {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -968,9 +967,9 @@ pub union CONTEXT_0 {
|
||||
pub X: [u64; 31],
|
||||
}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::marker::Copy for CONTEXT_0 {}
|
||||
impl Copy for CONTEXT_0 {}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::clone::Clone for CONTEXT_0 {
|
||||
impl Clone for CONTEXT_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -1011,9 +1010,9 @@ pub struct CONTEXT_0_0 {
|
||||
pub Lr: u64,
|
||||
}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::marker::Copy for CONTEXT_0_0 {}
|
||||
impl Copy for CONTEXT_0_0 {}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
impl ::core::clone::Clone for CONTEXT_0_0 {
|
||||
impl Clone for CONTEXT_0_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -1069,9 +1068,9 @@ pub struct CONTEXT {
|
||||
pub LastExceptionFromRip: u64,
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::marker::Copy for CONTEXT {}
|
||||
impl Copy for CONTEXT {}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::clone::Clone for CONTEXT {
|
||||
impl Clone for CONTEXT {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -1083,9 +1082,9 @@ pub union CONTEXT_0 {
|
||||
pub Anonymous: CONTEXT_0_0,
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::marker::Copy for CONTEXT_0 {}
|
||||
impl Copy for CONTEXT_0 {}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::clone::Clone for CONTEXT_0 {
|
||||
impl Clone for CONTEXT_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -1113,9 +1112,9 @@ pub struct CONTEXT_0_0 {
|
||||
pub Xmm15: M128A,
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::marker::Copy for CONTEXT_0_0 {}
|
||||
impl Copy for CONTEXT_0_0 {}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
impl ::core::clone::Clone for CONTEXT_0_0 {
|
||||
impl Clone for CONTEXT_0_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -1150,9 +1149,9 @@ pub struct CONTEXT {
|
||||
pub ExtendedRegisters: [u8; 512],
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::marker::Copy for CONTEXT {}
|
||||
impl Copy for CONTEXT {}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::clone::Clone for CONTEXT {
|
||||
impl Clone for CONTEXT {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3073,19 +3072,19 @@ pub struct EXCEPTION_RECORD {
|
||||
pub ExceptionCode: NTSTATUS,
|
||||
pub ExceptionFlags: u32,
|
||||
pub ExceptionRecord: *mut EXCEPTION_RECORD,
|
||||
pub ExceptionAddress: *mut ::core::ffi::c_void,
|
||||
pub ExceptionAddress: *mut core::ffi::c_void,
|
||||
pub NumberParameters: u32,
|
||||
pub ExceptionInformation: [usize; 15],
|
||||
}
|
||||
impl ::core::marker::Copy for EXCEPTION_RECORD {}
|
||||
impl ::core::clone::Clone for EXCEPTION_RECORD {
|
||||
impl Copy for EXCEPTION_RECORD {}
|
||||
impl Clone for EXCEPTION_RECORD {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
pub const EXCEPTION_STACK_OVERFLOW: NTSTATUS = -1073741571i32;
|
||||
pub const EXCEPTION_STACK_OVERFLOW: NTSTATUS = 0xC00000FD_u32 as _;
|
||||
pub const EXTENDED_STARTUPINFO_PRESENT: PROCESS_CREATION_FLAGS = 524288u32;
|
||||
pub const E_NOTIMPL: HRESULT = -2147467263i32;
|
||||
pub const E_NOTIMPL: HRESULT = 0x80004001_u32 as _;
|
||||
pub const ExceptionCollidedUnwind: EXCEPTION_DISPOSITION = 3i32;
|
||||
pub const ExceptionContinueExecution: EXCEPTION_DISPOSITION = 0i32;
|
||||
pub const ExceptionContinueSearch: EXCEPTION_DISPOSITION = 1i32;
|
||||
@@ -3093,15 +3092,15 @@ fn clone(&self) -> Self {
|
||||
pub type FACILITY_CODE = u32;
|
||||
pub const FACILITY_NT_BIT: FACILITY_CODE = 268435456u32;
|
||||
pub const FALSE: BOOL = 0i32;
|
||||
pub type FARPROC = ::core::option::Option<unsafe extern "system" fn() -> isize>;
|
||||
pub type FARPROC = Option<unsafe extern "system" fn() -> isize>;
|
||||
pub const FAST_FAIL_FATAL_APP_EXIT: u32 = 7u32;
|
||||
#[repr(C)]
|
||||
pub struct FD_SET {
|
||||
pub fd_count: u32,
|
||||
pub fd_array: [SOCKET; 64],
|
||||
}
|
||||
impl ::core::marker::Copy for FD_SET {}
|
||||
impl ::core::clone::Clone for FD_SET {
|
||||
impl Copy for FD_SET {}
|
||||
impl Clone for FD_SET {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3111,8 +3110,8 @@ pub struct FILETIME {
|
||||
pub dwLowDateTime: u32,
|
||||
pub dwHighDateTime: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for FILETIME {}
|
||||
impl ::core::clone::Clone for FILETIME {
|
||||
impl Copy for FILETIME {}
|
||||
impl Clone for FILETIME {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3124,8 +3123,8 @@ fn clone(&self) -> Self {
|
||||
pub struct FILE_ALLOCATION_INFO {
|
||||
pub AllocationSize: i64,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_ALLOCATION_INFO {}
|
||||
impl ::core::clone::Clone for FILE_ALLOCATION_INFO {
|
||||
impl Copy for FILE_ALLOCATION_INFO {}
|
||||
impl Clone for FILE_ALLOCATION_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3156,8 +3155,8 @@ pub struct FILE_ATTRIBUTE_TAG_INFO {
|
||||
pub FileAttributes: u32,
|
||||
pub ReparseTag: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_ATTRIBUTE_TAG_INFO {}
|
||||
impl ::core::clone::Clone for FILE_ATTRIBUTE_TAG_INFO {
|
||||
impl Copy for FILE_ATTRIBUTE_TAG_INFO {}
|
||||
impl Clone for FILE_ATTRIBUTE_TAG_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3173,8 +3172,8 @@ pub struct FILE_BASIC_INFO {
|
||||
pub ChangeTime: i64,
|
||||
pub FileAttributes: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_BASIC_INFO {}
|
||||
impl ::core::clone::Clone for FILE_BASIC_INFO {
|
||||
impl Copy for FILE_BASIC_INFO {}
|
||||
impl Clone for FILE_BASIC_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3201,8 +3200,8 @@ fn clone(&self) -> Self {
|
||||
pub struct FILE_DISPOSITION_INFO {
|
||||
pub DeleteFile: BOOLEAN,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_DISPOSITION_INFO {}
|
||||
impl ::core::clone::Clone for FILE_DISPOSITION_INFO {
|
||||
impl Copy for FILE_DISPOSITION_INFO {}
|
||||
impl Clone for FILE_DISPOSITION_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3211,8 +3210,8 @@ fn clone(&self) -> Self {
|
||||
pub struct FILE_DISPOSITION_INFO_EX {
|
||||
pub Flags: FILE_DISPOSITION_INFO_EX_FLAGS,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_DISPOSITION_INFO_EX {}
|
||||
impl ::core::clone::Clone for FILE_DISPOSITION_INFO_EX {
|
||||
impl Copy for FILE_DISPOSITION_INFO_EX {}
|
||||
impl Clone for FILE_DISPOSITION_INFO_EX {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3223,8 +3222,8 @@ fn clone(&self) -> Self {
|
||||
pub struct FILE_END_OF_FILE_INFO {
|
||||
pub EndOfFile: i64,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_END_OF_FILE_INFO {}
|
||||
impl ::core::clone::Clone for FILE_END_OF_FILE_INFO {
|
||||
impl Copy for FILE_END_OF_FILE_INFO {}
|
||||
impl Clone for FILE_END_OF_FILE_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3264,8 +3263,8 @@ pub struct FILE_ID_BOTH_DIR_INFO {
|
||||
pub FileId: i64,
|
||||
pub FileName: [u16; 1],
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_ID_BOTH_DIR_INFO {}
|
||||
impl ::core::clone::Clone for FILE_ID_BOTH_DIR_INFO {
|
||||
impl Copy for FILE_ID_BOTH_DIR_INFO {}
|
||||
impl Clone for FILE_ID_BOTH_DIR_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3275,8 +3274,8 @@ fn clone(&self) -> Self {
|
||||
pub struct FILE_IO_PRIORITY_HINT_INFO {
|
||||
pub PriorityHint: PRIORITY_HINT,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_IO_PRIORITY_HINT_INFO {}
|
||||
impl ::core::clone::Clone for FILE_IO_PRIORITY_HINT_INFO {
|
||||
impl Copy for FILE_IO_PRIORITY_HINT_INFO {}
|
||||
impl Clone for FILE_IO_PRIORITY_HINT_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3318,8 +3317,8 @@ pub struct FILE_STANDARD_INFO {
|
||||
pub DeletePending: BOOLEAN,
|
||||
pub Directory: BOOLEAN,
|
||||
}
|
||||
impl ::core::marker::Copy for FILE_STANDARD_INFO {}
|
||||
impl ::core::clone::Clone for FILE_STANDARD_INFO {
|
||||
impl Copy for FILE_STANDARD_INFO {}
|
||||
impl Clone for FILE_STANDARD_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3353,9 +3352,9 @@ pub struct FLOATING_SAVE_AREA {
|
||||
pub Cr0NpxState: u32,
|
||||
}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::marker::Copy for FLOATING_SAVE_AREA {}
|
||||
impl Copy for FLOATING_SAVE_AREA {}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::clone::Clone for FLOATING_SAVE_AREA {
|
||||
impl Clone for FLOATING_SAVE_AREA {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3374,9 +3373,9 @@ pub struct FLOATING_SAVE_AREA {
|
||||
pub Spare0: u32,
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::marker::Copy for FLOATING_SAVE_AREA {}
|
||||
impl Copy for FLOATING_SAVE_AREA {}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::clone::Clone for FLOATING_SAVE_AREA {
|
||||
impl Clone for FLOATING_SAVE_AREA {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3429,8 +3428,8 @@ pub struct GUID {
|
||||
pub data3: u16,
|
||||
pub data4: [u8; 8],
|
||||
}
|
||||
impl ::core::marker::Copy for GUID {}
|
||||
impl ::core::clone::Clone for GUID {
|
||||
impl Copy for GUID {}
|
||||
impl Clone for GUID {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3445,21 +3444,21 @@ pub const fn from_u128(uuid: u128) -> Self {
|
||||
}
|
||||
}
|
||||
}
|
||||
pub type HANDLE = *mut ::core::ffi::c_void;
|
||||
pub type HANDLE = *mut core::ffi::c_void;
|
||||
pub type HANDLE_FLAGS = u32;
|
||||
pub const HANDLE_FLAG_INHERIT: HANDLE_FLAGS = 1u32;
|
||||
pub const HANDLE_FLAG_PROTECT_FROM_CLOSE: HANDLE_FLAGS = 2u32;
|
||||
pub const HIGH_PRIORITY_CLASS: PROCESS_CREATION_FLAGS = 128u32;
|
||||
pub type HLOCAL = *mut ::core::ffi::c_void;
|
||||
pub type HMODULE = *mut ::core::ffi::c_void;
|
||||
pub type HLOCAL = *mut core::ffi::c_void;
|
||||
pub type HMODULE = *mut core::ffi::c_void;
|
||||
pub type HRESULT = i32;
|
||||
pub const IDLE_PRIORITY_CLASS: PROCESS_CREATION_FLAGS = 64u32;
|
||||
#[repr(C)]
|
||||
pub struct IN6_ADDR {
|
||||
pub u: IN6_ADDR_0,
|
||||
}
|
||||
impl ::core::marker::Copy for IN6_ADDR {}
|
||||
impl ::core::clone::Clone for IN6_ADDR {
|
||||
impl Copy for IN6_ADDR {}
|
||||
impl Clone for IN6_ADDR {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3469,8 +3468,8 @@ pub union IN6_ADDR_0 {
|
||||
pub Byte: [u8; 16],
|
||||
pub Word: [u16; 8],
|
||||
}
|
||||
impl ::core::marker::Copy for IN6_ADDR_0 {}
|
||||
impl ::core::clone::Clone for IN6_ADDR_0 {
|
||||
impl Copy for IN6_ADDR_0 {}
|
||||
impl Clone for IN6_ADDR_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3480,10 +3479,10 @@ fn clone(&self) -> Self {
|
||||
pub const INHERIT_PARENT_AFFINITY: PROCESS_CREATION_FLAGS = 65536u32;
|
||||
#[repr(C)]
|
||||
pub union INIT_ONCE {
|
||||
pub Ptr: *mut ::core::ffi::c_void,
|
||||
pub Ptr: *mut core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for INIT_ONCE {}
|
||||
impl ::core::clone::Clone for INIT_ONCE {
|
||||
impl Copy for INIT_ONCE {}
|
||||
impl Clone for INIT_ONCE {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3495,8 +3494,8 @@ fn clone(&self) -> Self {
|
||||
pub struct IN_ADDR {
|
||||
pub S_un: IN_ADDR_0,
|
||||
}
|
||||
impl ::core::marker::Copy for IN_ADDR {}
|
||||
impl ::core::clone::Clone for IN_ADDR {
|
||||
impl Copy for IN_ADDR {}
|
||||
impl Clone for IN_ADDR {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3507,8 +3506,8 @@ pub union IN_ADDR_0 {
|
||||
pub S_un_w: IN_ADDR_0_1,
|
||||
pub S_addr: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for IN_ADDR_0 {}
|
||||
impl ::core::clone::Clone for IN_ADDR_0 {
|
||||
impl Copy for IN_ADDR_0 {}
|
||||
impl Clone for IN_ADDR_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3520,8 +3519,8 @@ pub struct IN_ADDR_0_0 {
|
||||
pub s_b3: u8,
|
||||
pub s_b4: u8,
|
||||
}
|
||||
impl ::core::marker::Copy for IN_ADDR_0_0 {}
|
||||
impl ::core::clone::Clone for IN_ADDR_0_0 {
|
||||
impl Copy for IN_ADDR_0_0 {}
|
||||
impl Clone for IN_ADDR_0_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3531,8 +3530,8 @@ pub struct IN_ADDR_0_1 {
|
||||
pub s_w1: u16,
|
||||
pub s_w2: u16,
|
||||
}
|
||||
impl ::core::marker::Copy for IN_ADDR_0_1 {}
|
||||
impl ::core::clone::Clone for IN_ADDR_0_1 {
|
||||
impl Copy for IN_ADDR_0_1 {}
|
||||
impl Clone for IN_ADDR_0_1 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3544,8 +3543,8 @@ pub struct IO_STATUS_BLOCK {
|
||||
pub Anonymous: IO_STATUS_BLOCK_0,
|
||||
pub Information: usize,
|
||||
}
|
||||
impl ::core::marker::Copy for IO_STATUS_BLOCK {}
|
||||
impl ::core::clone::Clone for IO_STATUS_BLOCK {
|
||||
impl Copy for IO_STATUS_BLOCK {}
|
||||
impl Clone for IO_STATUS_BLOCK {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3553,10 +3552,10 @@ fn clone(&self) -> Self {
|
||||
#[repr(C)]
|
||||
pub union IO_STATUS_BLOCK_0 {
|
||||
pub Status: NTSTATUS,
|
||||
pub Pointer: *mut ::core::ffi::c_void,
|
||||
pub Pointer: *mut core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for IO_STATUS_BLOCK_0 {}
|
||||
impl ::core::clone::Clone for IO_STATUS_BLOCK_0 {
|
||||
impl Copy for IO_STATUS_BLOCK_0 {}
|
||||
impl Clone for IO_STATUS_BLOCK_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3606,8 +3605,8 @@ pub struct IPV6_MREQ {
|
||||
pub ipv6mr_multiaddr: IN6_ADDR,
|
||||
pub ipv6mr_interface: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for IPV6_MREQ {}
|
||||
impl ::core::clone::Clone for IPV6_MREQ {
|
||||
impl Copy for IPV6_MREQ {}
|
||||
impl Clone for IPV6_MREQ {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3621,8 +3620,8 @@ pub struct IP_MREQ {
|
||||
pub imr_multiaddr: IN_ADDR,
|
||||
pub imr_interface: IN_ADDR,
|
||||
}
|
||||
impl ::core::marker::Copy for IP_MREQ {}
|
||||
impl ::core::clone::Clone for IP_MREQ {
|
||||
impl Copy for IP_MREQ {}
|
||||
impl Clone for IP_MREQ {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3635,21 +3634,21 @@ pub struct LINGER {
|
||||
pub l_onoff: u16,
|
||||
pub l_linger: u16,
|
||||
}
|
||||
impl ::core::marker::Copy for LINGER {}
|
||||
impl ::core::clone::Clone for LINGER {
|
||||
impl Copy for LINGER {}
|
||||
impl Clone for LINGER {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
pub type LPOVERLAPPED_COMPLETION_ROUTINE = ::core::option::Option<
|
||||
pub type LPOVERLAPPED_COMPLETION_ROUTINE = Option<
|
||||
unsafe extern "system" fn(
|
||||
dwerrorcode: u32,
|
||||
dwnumberofbytestransfered: u32,
|
||||
lpoverlapped: *mut OVERLAPPED,
|
||||
) -> (),
|
||||
),
|
||||
>;
|
||||
pub type LPPROC_THREAD_ATTRIBUTE_LIST = *mut ::core::ffi::c_void;
|
||||
pub type LPPROGRESS_ROUTINE = ::core::option::Option<
|
||||
pub type LPPROC_THREAD_ATTRIBUTE_LIST = *mut core::ffi::c_void;
|
||||
pub type LPPROGRESS_ROUTINE = Option<
|
||||
unsafe extern "system" fn(
|
||||
totalfilesize: i64,
|
||||
totalbytestransferred: i64,
|
||||
@@ -3659,28 +3658,27 @@ fn clone(&self) -> Self {
|
||||
dwcallbackreason: LPPROGRESS_ROUTINE_CALLBACK_REASON,
|
||||
hsourcefile: HANDLE,
|
||||
hdestinationfile: HANDLE,
|
||||
lpdata: *const ::core::ffi::c_void,
|
||||
lpdata: *const core::ffi::c_void,
|
||||
) -> u32,
|
||||
>;
|
||||
pub type LPPROGRESS_ROUTINE_CALLBACK_REASON = u32;
|
||||
pub type LPTHREAD_START_ROUTINE = ::core::option::Option<
|
||||
unsafe extern "system" fn(lpthreadparameter: *mut ::core::ffi::c_void) -> u32,
|
||||
>;
|
||||
pub type LPWSAOVERLAPPED_COMPLETION_ROUTINE = ::core::option::Option<
|
||||
pub type LPTHREAD_START_ROUTINE =
|
||||
Option<unsafe extern "system" fn(lpthreadparameter: *mut core::ffi::c_void) -> u32>;
|
||||
pub type LPWSAOVERLAPPED_COMPLETION_ROUTINE = Option<
|
||||
unsafe extern "system" fn(
|
||||
dwerror: u32,
|
||||
cbtransferred: u32,
|
||||
lpoverlapped: *mut OVERLAPPED,
|
||||
dwflags: u32,
|
||||
) -> (),
|
||||
),
|
||||
>;
|
||||
#[repr(C)]
|
||||
pub struct M128A {
|
||||
pub Low: u64,
|
||||
pub High: i64,
|
||||
}
|
||||
impl ::core::marker::Copy for M128A {}
|
||||
impl ::core::clone::Clone for M128A {
|
||||
impl Copy for M128A {}
|
||||
impl Clone for M128A {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3717,11 +3715,11 @@ pub struct OBJECT_ATTRIBUTES {
|
||||
pub RootDirectory: HANDLE,
|
||||
pub ObjectName: *const UNICODE_STRING,
|
||||
pub Attributes: u32,
|
||||
pub SecurityDescriptor: *const ::core::ffi::c_void,
|
||||
pub SecurityQualityOfService: *const ::core::ffi::c_void,
|
||||
pub SecurityDescriptor: *const core::ffi::c_void,
|
||||
pub SecurityQualityOfService: *const core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for OBJECT_ATTRIBUTES {}
|
||||
impl ::core::clone::Clone for OBJECT_ATTRIBUTES {
|
||||
impl Copy for OBJECT_ATTRIBUTES {}
|
||||
impl Clone for OBJECT_ATTRIBUTES {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3736,8 +3734,8 @@ pub struct OVERLAPPED {
|
||||
pub Anonymous: OVERLAPPED_0,
|
||||
pub hEvent: HANDLE,
|
||||
}
|
||||
impl ::core::marker::Copy for OVERLAPPED {}
|
||||
impl ::core::clone::Clone for OVERLAPPED {
|
||||
impl Copy for OVERLAPPED {}
|
||||
impl Clone for OVERLAPPED {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3745,10 +3743,10 @@ fn clone(&self) -> Self {
|
||||
#[repr(C)]
|
||||
pub union OVERLAPPED_0 {
|
||||
pub Anonymous: OVERLAPPED_0_0,
|
||||
pub Pointer: *mut ::core::ffi::c_void,
|
||||
pub Pointer: *mut core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for OVERLAPPED_0 {}
|
||||
impl ::core::clone::Clone for OVERLAPPED_0 {
|
||||
impl Copy for OVERLAPPED_0 {}
|
||||
impl Clone for OVERLAPPED_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3758,20 +3756,20 @@ pub struct OVERLAPPED_0_0 {
|
||||
pub Offset: u32,
|
||||
pub OffsetHigh: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for OVERLAPPED_0_0 {}
|
||||
impl ::core::clone::Clone for OVERLAPPED_0_0 {
|
||||
impl Copy for OVERLAPPED_0_0 {}
|
||||
impl Clone for OVERLAPPED_0_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
pub type PCSTR = *const u8;
|
||||
pub type PCWSTR = *const u16;
|
||||
pub type PIO_APC_ROUTINE = ::core::option::Option<
|
||||
pub type PIO_APC_ROUTINE = Option<
|
||||
unsafe extern "system" fn(
|
||||
apccontext: *mut ::core::ffi::c_void,
|
||||
apccontext: *mut core::ffi::c_void,
|
||||
iostatusblock: *mut IO_STATUS_BLOCK,
|
||||
reserved: u32,
|
||||
) -> (),
|
||||
),
|
||||
>;
|
||||
pub const PIPE_ACCEPT_REMOTE_CLIENTS: NAMED_PIPE_MODE = 0u32;
|
||||
pub const PIPE_ACCESS_DUPLEX: FILE_FLAGS_AND_ATTRIBUTES = 3u32;
|
||||
@@ -3796,8 +3794,8 @@ pub struct PROCESS_INFORMATION {
|
||||
pub dwProcessId: u32,
|
||||
pub dwThreadId: u32,
|
||||
}
|
||||
impl ::core::marker::Copy for PROCESS_INFORMATION {}
|
||||
impl ::core::clone::Clone for PROCESS_INFORMATION {
|
||||
impl Copy for PROCESS_INFORMATION {}
|
||||
impl Clone for PROCESS_INFORMATION {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3809,12 +3807,12 @@ fn clone(&self) -> Self {
|
||||
pub const PROFILE_USER: PROCESS_CREATION_FLAGS = 268435456u32;
|
||||
pub const PROGRESS_CONTINUE: u32 = 0u32;
|
||||
pub type PSTR = *mut u8;
|
||||
pub type PTIMERAPCROUTINE = ::core::option::Option<
|
||||
pub type PTIMERAPCROUTINE = Option<
|
||||
unsafe extern "system" fn(
|
||||
lpargtocompletionroutine: *const ::core::ffi::c_void,
|
||||
lpargtocompletionroutine: *const core::ffi::c_void,
|
||||
dwtimerlowvalue: u32,
|
||||
dwtimerhighvalue: u32,
|
||||
) -> (),
|
||||
),
|
||||
>;
|
||||
pub type PWSTR = *mut u16;
|
||||
pub const READ_CONTROL: FILE_ACCESS_RIGHTS = 131072u32;
|
||||
@@ -3826,11 +3824,11 @@ fn clone(&self) -> Self {
|
||||
#[repr(C)]
|
||||
pub struct SECURITY_ATTRIBUTES {
|
||||
pub nLength: u32,
|
||||
pub lpSecurityDescriptor: *mut ::core::ffi::c_void,
|
||||
pub lpSecurityDescriptor: *mut core::ffi::c_void,
|
||||
pub bInheritHandle: BOOL,
|
||||
}
|
||||
impl ::core::marker::Copy for SECURITY_ATTRIBUTES {}
|
||||
impl ::core::clone::Clone for SECURITY_ATTRIBUTES {
|
||||
impl Copy for SECURITY_ATTRIBUTES {}
|
||||
impl Clone for SECURITY_ATTRIBUTES {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3847,10 +3845,10 @@ fn clone(&self) -> Self {
|
||||
#[repr(C)]
|
||||
pub struct SOCKADDR {
|
||||
pub sa_family: ADDRESS_FAMILY,
|
||||
pub sa_data: [u8; 14],
|
||||
pub sa_data: [i8; 14],
|
||||
}
|
||||
impl ::core::marker::Copy for SOCKADDR {}
|
||||
impl ::core::clone::Clone for SOCKADDR {
|
||||
impl Copy for SOCKADDR {}
|
||||
impl Clone for SOCKADDR {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3858,10 +3856,10 @@ fn clone(&self) -> Self {
|
||||
#[repr(C)]
|
||||
pub struct SOCKADDR_UN {
|
||||
pub sun_family: ADDRESS_FAMILY,
|
||||
pub sun_path: [u8; 108],
|
||||
pub sun_path: [i8; 108],
|
||||
}
|
||||
impl ::core::marker::Copy for SOCKADDR_UN {}
|
||||
impl ::core::clone::Clone for SOCKADDR_UN {
|
||||
impl Copy for SOCKADDR_UN {}
|
||||
impl Clone for SOCKADDR_UN {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3882,10 +3880,10 @@ fn clone(&self) -> Self {
|
||||
pub const SPECIFIC_RIGHTS_ALL: FILE_ACCESS_RIGHTS = 65535u32;
|
||||
#[repr(C)]
|
||||
pub struct SRWLOCK {
|
||||
pub Ptr: *mut ::core::ffi::c_void,
|
||||
pub Ptr: *mut core::ffi::c_void,
|
||||
}
|
||||
impl ::core::marker::Copy for SRWLOCK {}
|
||||
impl ::core::clone::Clone for SRWLOCK {
|
||||
impl Copy for SRWLOCK {}
|
||||
impl Clone for SRWLOCK {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3915,8 +3913,8 @@ pub struct STARTUPINFOEXW {
|
||||
pub StartupInfo: STARTUPINFOW,
|
||||
pub lpAttributeList: LPPROC_THREAD_ATTRIBUTE_LIST,
|
||||
}
|
||||
impl ::core::marker::Copy for STARTUPINFOEXW {}
|
||||
impl ::core::clone::Clone for STARTUPINFOEXW {
|
||||
impl Copy for STARTUPINFOEXW {}
|
||||
impl Clone for STARTUPINFOEXW {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3942,19 +3940,19 @@ pub struct STARTUPINFOW {
|
||||
pub hStdOutput: HANDLE,
|
||||
pub hStdError: HANDLE,
|
||||
}
|
||||
impl ::core::marker::Copy for STARTUPINFOW {}
|
||||
impl ::core::clone::Clone for STARTUPINFOW {
|
||||
impl Copy for STARTUPINFOW {}
|
||||
impl Clone for STARTUPINFOW {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
pub type STARTUPINFOW_FLAGS = u32;
|
||||
pub const STATUS_DELETE_PENDING: NTSTATUS = -1073741738i32;
|
||||
pub const STATUS_END_OF_FILE: NTSTATUS = -1073741807i32;
|
||||
pub const STATUS_INVALID_PARAMETER: NTSTATUS = -1073741811i32;
|
||||
pub const STATUS_NOT_IMPLEMENTED: NTSTATUS = -1073741822i32;
|
||||
pub const STATUS_PENDING: NTSTATUS = 259i32;
|
||||
pub const STATUS_SUCCESS: NTSTATUS = 0i32;
|
||||
pub const STATUS_DELETE_PENDING: NTSTATUS = 0xC0000056_u32 as _;
|
||||
pub const STATUS_END_OF_FILE: NTSTATUS = 0xC0000011_u32 as _;
|
||||
pub const STATUS_INVALID_PARAMETER: NTSTATUS = 0xC000000D_u32 as _;
|
||||
pub const STATUS_NOT_IMPLEMENTED: NTSTATUS = 0xC0000002_u32 as _;
|
||||
pub const STATUS_PENDING: NTSTATUS = 0x103_u32 as _;
|
||||
pub const STATUS_SUCCESS: NTSTATUS = 0x0_u32 as _;
|
||||
pub const STD_ERROR_HANDLE: STD_HANDLE = 4294967284u32;
|
||||
pub type STD_HANDLE = u32;
|
||||
pub const STD_INPUT_HANDLE: STD_HANDLE = 4294967286u32;
|
||||
@@ -3969,8 +3967,8 @@ fn clone(&self) -> Self {
|
||||
pub struct SYSTEM_INFO {
|
||||
pub Anonymous: SYSTEM_INFO_0,
|
||||
pub dwPageSize: u32,
|
||||
pub lpMinimumApplicationAddress: *mut ::core::ffi::c_void,
|
||||
pub lpMaximumApplicationAddress: *mut ::core::ffi::c_void,
|
||||
pub lpMinimumApplicationAddress: *mut core::ffi::c_void,
|
||||
pub lpMaximumApplicationAddress: *mut core::ffi::c_void,
|
||||
pub dwActiveProcessorMask: usize,
|
||||
pub dwNumberOfProcessors: u32,
|
||||
pub dwProcessorType: u32,
|
||||
@@ -3978,8 +3976,8 @@ pub struct SYSTEM_INFO {
|
||||
pub wProcessorLevel: u16,
|
||||
pub wProcessorRevision: u16,
|
||||
}
|
||||
impl ::core::marker::Copy for SYSTEM_INFO {}
|
||||
impl ::core::clone::Clone for SYSTEM_INFO {
|
||||
impl Copy for SYSTEM_INFO {}
|
||||
impl Clone for SYSTEM_INFO {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -3989,8 +3987,8 @@ pub union SYSTEM_INFO_0 {
|
||||
pub dwOemId: u32,
|
||||
pub Anonymous: SYSTEM_INFO_0_0,
|
||||
}
|
||||
impl ::core::marker::Copy for SYSTEM_INFO_0 {}
|
||||
impl ::core::clone::Clone for SYSTEM_INFO_0 {
|
||||
impl Copy for SYSTEM_INFO_0 {}
|
||||
impl Clone for SYSTEM_INFO_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4000,8 +3998,8 @@ pub struct SYSTEM_INFO_0_0 {
|
||||
pub wProcessorArchitecture: PROCESSOR_ARCHITECTURE,
|
||||
pub wReserved: u16,
|
||||
}
|
||||
impl ::core::marker::Copy for SYSTEM_INFO_0_0 {}
|
||||
impl ::core::clone::Clone for SYSTEM_INFO_0_0 {
|
||||
impl Copy for SYSTEM_INFO_0_0 {}
|
||||
impl Clone for SYSTEM_INFO_0_0 {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4017,8 +4015,8 @@ pub struct TIMEVAL {
|
||||
pub tv_sec: i32,
|
||||
pub tv_usec: i32,
|
||||
}
|
||||
impl ::core::marker::Copy for TIMEVAL {}
|
||||
impl ::core::clone::Clone for TIMEVAL {
|
||||
impl Copy for TIMEVAL {}
|
||||
impl Clone for TIMEVAL {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4054,8 +4052,8 @@ pub struct UNICODE_STRING {
|
||||
pub MaximumLength: u16,
|
||||
pub Buffer: PWSTR,
|
||||
}
|
||||
impl ::core::marker::Copy for UNICODE_STRING {}
|
||||
impl ::core::clone::Clone for UNICODE_STRING {
|
||||
impl Copy for UNICODE_STRING {}
|
||||
impl Clone for UNICODE_STRING {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4085,8 +4083,8 @@ pub struct WIN32_FIND_DATAW {
|
||||
pub cFileName: [u16; 260],
|
||||
pub cAlternateFileName: [u16; 14],
|
||||
}
|
||||
impl ::core::marker::Copy for WIN32_FIND_DATAW {}
|
||||
impl ::core::clone::Clone for WIN32_FIND_DATAW {
|
||||
impl Copy for WIN32_FIND_DATAW {}
|
||||
impl Clone for WIN32_FIND_DATAW {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4101,8 +4099,8 @@ pub struct WSABUF {
|
||||
pub len: u32,
|
||||
pub buf: PSTR,
|
||||
}
|
||||
impl ::core::marker::Copy for WSABUF {}
|
||||
impl ::core::clone::Clone for WSABUF {
|
||||
impl Copy for WSABUF {}
|
||||
impl Clone for WSABUF {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4115,13 +4113,13 @@ pub struct WSADATA {
|
||||
pub iMaxSockets: u16,
|
||||
pub iMaxUdpDg: u16,
|
||||
pub lpVendorInfo: PSTR,
|
||||
pub szDescription: [u8; 257],
|
||||
pub szSystemStatus: [u8; 129],
|
||||
pub szDescription: [i8; 257],
|
||||
pub szSystemStatus: [i8; 129],
|
||||
}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::marker::Copy for WSADATA {}
|
||||
impl Copy for WSADATA {}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::clone::Clone for WSADATA {
|
||||
impl Clone for WSADATA {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4131,16 +4129,16 @@ fn clone(&self) -> Self {
|
||||
pub struct WSADATA {
|
||||
pub wVersion: u16,
|
||||
pub wHighVersion: u16,
|
||||
pub szDescription: [u8; 257],
|
||||
pub szSystemStatus: [u8; 129],
|
||||
pub szDescription: [i8; 257],
|
||||
pub szSystemStatus: [i8; 129],
|
||||
pub iMaxSockets: u16,
|
||||
pub iMaxUdpDg: u16,
|
||||
pub lpVendorInfo: PSTR,
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::marker::Copy for WSADATA {}
|
||||
impl Copy for WSADATA {}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::clone::Clone for WSADATA {
|
||||
impl Clone for WSADATA {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4204,8 +4202,8 @@ pub struct WSAPROTOCOLCHAIN {
|
||||
pub ChainLen: i32,
|
||||
pub ChainEntries: [u32; 7],
|
||||
}
|
||||
impl ::core::marker::Copy for WSAPROTOCOLCHAIN {}
|
||||
impl ::core::clone::Clone for WSAPROTOCOLCHAIN {
|
||||
impl Copy for WSAPROTOCOLCHAIN {}
|
||||
impl Clone for WSAPROTOCOLCHAIN {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4233,8 +4231,8 @@ pub struct WSAPROTOCOL_INFOW {
|
||||
pub dwProviderReserved: u32,
|
||||
pub szProtocol: [u16; 256],
|
||||
}
|
||||
impl ::core::marker::Copy for WSAPROTOCOL_INFOW {}
|
||||
impl ::core::clone::Clone for WSAPROTOCOL_INFOW {
|
||||
impl Copy for WSAPROTOCOL_INFOW {}
|
||||
impl Clone for WSAPROTOCOL_INFOW {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4308,9 +4306,9 @@ pub struct XSAVE_FORMAT {
|
||||
pub Reserved4: [u8; 96],
|
||||
}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::marker::Copy for XSAVE_FORMAT {}
|
||||
impl Copy for XSAVE_FORMAT {}
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))]
|
||||
impl ::core::clone::Clone for XSAVE_FORMAT {
|
||||
impl Clone for XSAVE_FORMAT {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
@@ -4336,9 +4334,9 @@ pub struct XSAVE_FORMAT {
|
||||
pub Reserved4: [u8; 224],
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::marker::Copy for XSAVE_FORMAT {}
|
||||
impl Copy for XSAVE_FORMAT {}
|
||||
#[cfg(target_arch = "x86")]
|
||||
impl ::core::clone::Clone for XSAVE_FORMAT {
|
||||
impl Clone for XSAVE_FORMAT {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
|
||||
@@ -13,22 +13,21 @@
|
||||
(@key $t:ty, const $init:expr) => {{
|
||||
#[inline]
|
||||
#[deny(unsafe_op_in_unsafe_fn)]
|
||||
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_refs` lint
|
||||
#[cfg_attr(bootstrap, allow(static_mut_ref))]
|
||||
#[cfg_attr(not(bootstrap), allow(static_mut_refs))]
|
||||
unsafe fn __getit(
|
||||
_init: $crate::option::Option<&mut $crate::option::Option<$t>>,
|
||||
) -> $crate::option::Option<&'static $t> {
|
||||
const INIT_EXPR: $t = $init;
|
||||
// If the platform has support for `#[thread_local]`, use it.
|
||||
#[thread_local]
|
||||
static mut VAL: $t = INIT_EXPR;
|
||||
// We use `UnsafeCell` here instead of `static mut` to ensure any generated TLS shims
|
||||
// have a nonnull attribute on their return value.
|
||||
static VAL: $crate::cell::UnsafeCell<$t> = $crate::cell::UnsafeCell::new(INIT_EXPR);
|
||||
|
||||
// If a dtor isn't needed we can do something "very raw" and
|
||||
// just get going.
|
||||
if !$crate::mem::needs_drop::<$t>() {
|
||||
unsafe {
|
||||
return $crate::option::Option::Some(&VAL)
|
||||
return $crate::option::Option::Some(&*VAL.get())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,15 +54,15 @@ unsafe fn __getit(
|
||||
// so now.
|
||||
0 => {
|
||||
$crate::thread::local_impl::Key::<$t>::register_dtor(
|
||||
$crate::ptr::addr_of_mut!(VAL) as *mut $crate::primitive::u8,
|
||||
VAL.get() as *mut $crate::primitive::u8,
|
||||
destroy,
|
||||
);
|
||||
STATE.set(1);
|
||||
$crate::option::Option::Some(&VAL)
|
||||
$crate::option::Option::Some(&*VAL.get())
|
||||
}
|
||||
// 1 == the destructor is registered and the value
|
||||
// is valid, so return the pointer.
|
||||
1 => $crate::option::Option::Some(&VAL),
|
||||
1 => $crate::option::Option::Some(&*VAL.get()),
|
||||
// otherwise the destructor has already run, so we
|
||||
// can't give access.
|
||||
_ => $crate::option::Option::None,
|
||||
|
||||
@@ -131,6 +131,8 @@ v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root",
|
||||
"riscv32gc-unknown-linux-musl install directory")
|
||||
v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root",
|
||||
"riscv64gc-unknown-linux-musl install directory")
|
||||
v("musl-root-loongarch64", "target.loongarch64-unknown-linux-musl.musl-root",
|
||||
"loongarch64-unknown-linux-musl install directory")
|
||||
v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
|
||||
"rootfs in qemu testing, you probably don't want to use this")
|
||||
v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
use std::io::Write;
|
||||
use std::process;
|
||||
use std::str::FromStr;
|
||||
use std::{
|
||||
env,
|
||||
fs::{self, OpenOptions},
|
||||
@@ -136,16 +137,25 @@ fn check_version(config: &Config) -> Option<String> {
|
||||
let latest_change_id = CONFIG_CHANGE_HISTORY.last().unwrap().change_id;
|
||||
let warned_id_path = config.out.join("bootstrap").join(".last-warned-change-id");
|
||||
|
||||
if let Some(id) = config.change_id {
|
||||
if let Some(mut id) = config.change_id {
|
||||
if id == latest_change_id {
|
||||
return None;
|
||||
}
|
||||
|
||||
if let Ok(last_warned_id) = fs::read_to_string(&warned_id_path) {
|
||||
if latest_change_id.to_string() == last_warned_id {
|
||||
return None;
|
||||
// Always try to use `change-id` from .last-warned-change-id first. If it doesn't exist,
|
||||
// then use the one from the config.toml. This way we never show the same warnings
|
||||
// more than once.
|
||||
if let Ok(t) = fs::read_to_string(&warned_id_path) {
|
||||
let last_warned_id =
|
||||
usize::from_str(&t).expect(&format!("{} is corrupted.", warned_id_path.display()));
|
||||
|
||||
// We only use the last_warned_id if it exists in `CONFIG_CHANGE_HISTORY`.
|
||||
// Otherwise, we may retrieve all the changes if it's not the highest value.
|
||||
// For better understanding, refer to `change_tracker::find_recent_config_change_ids`.
|
||||
if CONFIG_CHANGE_HISTORY.iter().any(|config| config.change_id == last_warned_id) {
|
||||
id = last_warned_id;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let changes = find_recent_config_change_ids(id);
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
let target_sysroot_bin =
|
||||
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
|
||||
t!(fs::create_dir_all(&target_sysroot_bin));
|
||||
builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
|
||||
builder.cp_link_r(&src_sysroot_bin, &target_sysroot_bin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ fn copy_and_stamp(
|
||||
dependency_type: DependencyType,
|
||||
) {
|
||||
let target = libdir.join(name);
|
||||
builder.copy(&sourcedir.join(name), &target);
|
||||
builder.copy_link(&sourcedir.join(name), &target);
|
||||
|
||||
target_deps.push((target, dependency_type));
|
||||
}
|
||||
@@ -316,7 +316,7 @@ fn copy_llvm_libunwind(builder: &Builder<'_>, target: TargetSelection, libdir: &
|
||||
let libunwind_path = builder.ensure(llvm::Libunwind { target });
|
||||
let libunwind_source = libunwind_path.join("libunwind.a");
|
||||
let libunwind_target = libdir.join("libunwind.a");
|
||||
builder.copy(&libunwind_source, &libunwind_target);
|
||||
builder.copy_link(&libunwind_source, &libunwind_target);
|
||||
libunwind_target
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ fn copy_self_contained_objects(
|
||||
for &obj in &["crtbegin.o", "crtbeginS.o", "crtend.o", "crtendS.o"] {
|
||||
let src = crt_path.join(obj);
|
||||
let target = libdir_self_contained.join(obj);
|
||||
builder.copy(&src, &target);
|
||||
builder.copy_link(&src, &target);
|
||||
target_deps.push((target, DependencyType::TargetSelfContained));
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ fn copy_self_contained_objects(
|
||||
for obj in ["crt2.o", "dllcrt2.o"].iter() {
|
||||
let src = compiler_file(builder, &builder.cc(target), target, CLang::C, obj);
|
||||
let target = libdir_self_contained.join(obj);
|
||||
builder.copy(&src, &target);
|
||||
builder.copy_link(&src, &target);
|
||||
target_deps.push((target, DependencyType::TargetSelfContained));
|
||||
}
|
||||
}
|
||||
@@ -637,7 +637,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
let stage0_bin_dir = builder.out.join(host).join("stage0/bin");
|
||||
let sysroot_bin_dir = sysroot.join("bin");
|
||||
t!(fs::create_dir_all(&sysroot_bin_dir));
|
||||
builder.cp_r(&stage0_bin_dir, &sysroot_bin_dir);
|
||||
builder.cp_link_r(&stage0_bin_dir, &sysroot_bin_dir);
|
||||
|
||||
// Copy all *.so files from stage0/lib to stage0-sysroot/lib
|
||||
let stage0_lib_dir = builder.out.join(host).join("stage0/lib");
|
||||
@@ -646,7 +646,8 @@ fn run(self, builder: &Builder<'_>) {
|
||||
let file = t!(file);
|
||||
let path = file.path();
|
||||
if path.is_file() && is_dylib(&file.file_name().into_string().unwrap()) {
|
||||
builder.copy(&path, &sysroot.join("lib").join(path.file_name().unwrap()));
|
||||
builder
|
||||
.copy_link(&path, &sysroot.join("lib").join(path.file_name().unwrap()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -661,7 +662,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
.join(host)
|
||||
.join("codegen-backends");
|
||||
if stage0_codegen_backends.exists() {
|
||||
builder.cp_r(&stage0_codegen_backends, &sysroot_codegen_backends);
|
||||
builder.cp_link_r(&stage0_codegen_backends, &sysroot_codegen_backends);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -684,7 +685,7 @@ fn copy_sanitizers(
|
||||
|
||||
for runtime in &runtimes {
|
||||
let dst = libdir.join(&runtime.name);
|
||||
builder.copy(&runtime.path, &dst);
|
||||
builder.copy_link(&runtime.path, &dst);
|
||||
|
||||
// The `aarch64-apple-ios-macabi` and `x86_64-apple-ios-macabi` are also supported for
|
||||
// sanitizers, but they share a sanitizer runtime with `${arch}-apple-darwin`, so we do
|
||||
@@ -790,7 +791,7 @@ fn run(self, builder: &Builder<'_>) -> Vec<(PathBuf, DependencyType)> {
|
||||
}
|
||||
|
||||
let target = sysroot_dir.join((*file).to_string() + ".o");
|
||||
builder.copy(dst_file, &target);
|
||||
builder.copy_link(dst_file, &target);
|
||||
target_deps.push((target, DependencyType::Target));
|
||||
}
|
||||
|
||||
@@ -812,7 +813,7 @@ fn cp_rustc_component_to_ci_sysroot(
|
||||
if src.is_dir() {
|
||||
t!(fs::create_dir_all(dst));
|
||||
} else {
|
||||
builder.copy(&src, &dst);
|
||||
builder.copy_link(&src, &dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1443,7 +1444,7 @@ fn copy_codegen_backends_to_sysroot(
|
||||
let dot = filename.find('.').unwrap();
|
||||
format!("{}-{}{}", &filename[..dash], builder.rust_release(), &filename[dot..])
|
||||
};
|
||||
builder.copy(file, &dst.join(target_filename));
|
||||
builder.copy_link(file, &dst.join(target_filename));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1599,7 +1600,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
|
||||
OsStr::new(std::env::consts::DLL_EXTENSION),
|
||||
];
|
||||
let ci_rustc_dir = builder.config.ci_rustc_dir();
|
||||
builder.cp_filtered(&ci_rustc_dir, &sysroot, &|path| {
|
||||
builder.cp_link_filtered(&ci_rustc_dir, &sysroot, &|path| {
|
||||
if path.extension().map_or(true, |ext| !filtered_extensions.contains(&ext)) {
|
||||
return true;
|
||||
}
|
||||
@@ -1791,7 +1792,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
let filename = f.file_name().into_string().unwrap();
|
||||
if (is_dylib(&filename) || is_debug_info(&filename)) && !proc_macros.contains(&filename)
|
||||
{
|
||||
builder.copy(&f.path(), &rustc_libdir.join(&filename));
|
||||
builder.copy_link(&f.path(), &rustc_libdir.join(&filename));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1805,7 +1806,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
if let Some(lld_install) = lld_install {
|
||||
let src_exe = exe("lld", target_compiler.host);
|
||||
let dst_exe = exe("rust-lld", target_compiler.host);
|
||||
builder.copy(&lld_install.join("bin").join(src_exe), &libdir_bin.join(dst_exe));
|
||||
builder.copy_link(&lld_install.join("bin").join(src_exe), &libdir_bin.join(dst_exe));
|
||||
let self_contained_lld_dir = libdir_bin.join("gcc-ld");
|
||||
t!(fs::create_dir_all(&self_contained_lld_dir));
|
||||
let lld_wrapper_exe = builder.ensure(crate::core::build_steps::tool::LldWrapper {
|
||||
@@ -1813,7 +1814,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
target: target_compiler.host,
|
||||
});
|
||||
for name in crate::LLD_FILE_NAMES {
|
||||
builder.copy(
|
||||
builder.copy_link(
|
||||
&lld_wrapper_exe,
|
||||
&self_contained_lld_dir.join(exe(name, target_compiler.host)),
|
||||
);
|
||||
@@ -1838,7 +1839,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
// When using `download-ci-llvm`, some of the tools
|
||||
// may not exist, so skip trying to copy them.
|
||||
if src_path.exists() {
|
||||
builder.copy(&src_path, &libdir_bin.join(&tool_exe));
|
||||
builder.copy_link(&src_path, &libdir_bin.join(&tool_exe));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1851,7 +1852,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
extra_features: vec![],
|
||||
});
|
||||
let tool_exe = exe("llvm-bitcode-linker", target_compiler.host);
|
||||
builder.copy(&src_path, &libdir_bin.join(&tool_exe));
|
||||
builder.copy_link(&src_path, &libdir_bin.join(&tool_exe));
|
||||
}
|
||||
|
||||
// Ensure that `libLLVM.so` ends up in the newly build compiler directory,
|
||||
@@ -1865,7 +1866,7 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
|
||||
let bindir = sysroot.join("bin");
|
||||
t!(fs::create_dir_all(bindir));
|
||||
let compiler = builder.rustc(target_compiler);
|
||||
builder.copy(&rustc, &compiler);
|
||||
builder.copy_link(&rustc, &compiler);
|
||||
|
||||
target_compiler
|
||||
}
|
||||
@@ -1891,7 +1892,7 @@ pub fn add_to_sysroot(
|
||||
DependencyType::Target => sysroot_dst,
|
||||
DependencyType::TargetSelfContained => self_contained_dst,
|
||||
};
|
||||
builder.copy(&path, &dst.join(path.file_name().unwrap()));
|
||||
builder.copy_link(&path, &dst.join(path.file_name().unwrap()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ fn make_win_dist(
|
||||
let dist_bin_dir = rust_root.join("bin/");
|
||||
fs::create_dir_all(&dist_bin_dir).expect("creating dist_bin_dir failed");
|
||||
for src in rustc_dlls {
|
||||
builder.copy_to_folder(&src, &dist_bin_dir);
|
||||
builder.copy_link_to_folder(&src, &dist_bin_dir);
|
||||
}
|
||||
|
||||
//Copy platform tools to platform-specific bin directory
|
||||
@@ -284,7 +284,7 @@ fn make_win_dist(
|
||||
.join("self-contained");
|
||||
fs::create_dir_all(&target_bin_dir).expect("creating target_bin_dir failed");
|
||||
for src in target_tools {
|
||||
builder.copy_to_folder(&src, &target_bin_dir);
|
||||
builder.copy_link_to_folder(&src, &target_bin_dir);
|
||||
}
|
||||
|
||||
// Warn windows-gnu users that the bundled GCC cannot compile C files
|
||||
@@ -304,7 +304,7 @@ fn make_win_dist(
|
||||
.join("self-contained");
|
||||
fs::create_dir_all(&target_lib_dir).expect("creating target_lib_dir failed");
|
||||
for src in target_libs {
|
||||
builder.copy_to_folder(&src, &target_lib_dir);
|
||||
builder.copy_link_to_folder(&src, &target_lib_dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
|
||||
// Copy rustc binary
|
||||
t!(fs::create_dir_all(image.join("bin")));
|
||||
builder.cp_r(&src.join("bin"), &image.join("bin"));
|
||||
builder.cp_link_r(&src.join("bin"), &image.join("bin"));
|
||||
|
||||
// If enabled, copy rustdoc binary
|
||||
if builder
|
||||
@@ -458,13 +458,13 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) {
|
||||
if builder.config.lld_enabled {
|
||||
let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
|
||||
let rust_lld = exe("rust-lld", compiler.host);
|
||||
builder.copy(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld));
|
||||
builder.copy_link(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld));
|
||||
let self_contained_lld_src_dir = src_dir.join("gcc-ld");
|
||||
let self_contained_lld_dst_dir = dst_dir.join("gcc-ld");
|
||||
t!(fs::create_dir(&self_contained_lld_dst_dir));
|
||||
for name in crate::LLD_FILE_NAMES {
|
||||
let exe_name = exe(name, compiler.host);
|
||||
builder.copy(
|
||||
builder.copy_link(
|
||||
&self_contained_lld_src_dir.join(&exe_name),
|
||||
&self_contained_lld_dst_dir.join(&exe_name),
|
||||
);
|
||||
@@ -609,9 +609,9 @@ fn copy_target_libs(builder: &Builder<'_>, target: TargetSelection, image: &Path
|
||||
t!(fs::create_dir_all(&self_contained_dst));
|
||||
for (path, dependency_type) in builder.read_stamp_file(stamp) {
|
||||
if dependency_type == DependencyType::TargetSelfContained {
|
||||
builder.copy(&path, &self_contained_dst.join(path.file_name().unwrap()));
|
||||
builder.copy_link(&path, &self_contained_dst.join(path.file_name().unwrap()));
|
||||
} else if dependency_type == DependencyType::Target || builder.config.build == target {
|
||||
builder.copy(&path, &dst.join(path.file_name().unwrap()));
|
||||
builder.copy_link(&path, &dst.join(path.file_name().unwrap()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -865,7 +865,8 @@ fn filter_fn(exclude_dirs: &[&str], dir: &str, path: &Path) -> bool {
|
||||
for item in src_dirs {
|
||||
let dst = &dst_dir.join(item);
|
||||
t!(fs::create_dir_all(dst));
|
||||
builder.cp_filtered(&base.join(item), dst, &|path| filter_fn(exclude_dirs, item, path));
|
||||
builder
|
||||
.cp_link_filtered(&base.join(item), dst, &|path| filter_fn(exclude_dirs, item, path));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -923,7 +924,7 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
|
||||
&dst_src,
|
||||
);
|
||||
for file in src_files.iter() {
|
||||
builder.copy(&builder.src.join(file), &dst_src.join(file));
|
||||
builder.copy_link(&builder.src.join(file), &dst_src.join(file));
|
||||
}
|
||||
|
||||
tarball.generate()
|
||||
@@ -979,7 +980,7 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
|
||||
|
||||
// Copy the files normally
|
||||
for item in &src_files {
|
||||
builder.copy(&builder.src.join(item), &plain_dst_src.join(item));
|
||||
builder.copy_link(&builder.src.join(item), &plain_dst_src.join(item));
|
||||
}
|
||||
|
||||
// Create the version file
|
||||
@@ -1608,7 +1609,7 @@ fn filter(contents: &str, marker: &str) -> String {
|
||||
|
||||
let prepare = |name: &str| {
|
||||
builder.create_dir(&pkg.join(name));
|
||||
builder.cp_r(
|
||||
builder.cp_link_r(
|
||||
&work.join(format!("{}-{}", pkgname(builder, name), target.triple)),
|
||||
&pkg.join(name),
|
||||
);
|
||||
@@ -1672,7 +1673,7 @@ fn filter(contents: &str, marker: &str) -> String {
|
||||
} else {
|
||||
name.to_string()
|
||||
};
|
||||
builder.cp_r(
|
||||
builder.cp_link_r(
|
||||
&work.join(format!("{}-{}", pkgname(builder, name), target.triple)).join(dir),
|
||||
&exe.join(name),
|
||||
);
|
||||
@@ -2040,7 +2041,7 @@ fn install_llvm_file(
|
||||
if install_symlink {
|
||||
// For download-ci-llvm, also install the symlink, to match what LLVM does. Using a
|
||||
// symlink is fine here, as this is not a rustup component.
|
||||
builder.copy(&source, &full_dest);
|
||||
builder.copy_link(&source, &full_dest);
|
||||
} else {
|
||||
// Otherwise, replace the symlink with an equivalent linker script. This is used when
|
||||
// projects like miri link against librustc_driver.so. We don't use a symlink, as
|
||||
|
||||
@@ -520,7 +520,10 @@ fn run(self, builder: &Builder<'_>) -> Self::Output {
|
||||
t!(fs::write(&version_info, info));
|
||||
}
|
||||
|
||||
builder.copy(&builder.src.join("src").join("doc").join("rust.css"), &out.join("rust.css"));
|
||||
builder.copy_link(
|
||||
&builder.src.join("src").join("doc").join("rust.css"),
|
||||
&out.join("rust.css"),
|
||||
);
|
||||
|
||||
SharedAssetsPaths { version_info }
|
||||
}
|
||||
@@ -718,7 +721,7 @@ fn doc_std(
|
||||
let _guard = builder.msg_doc(compiler, description, target);
|
||||
|
||||
builder.run(&mut cargo.into());
|
||||
builder.cp_r(&out_dir, out);
|
||||
builder.cp_link_r(&out_dir, out);
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||
@@ -1151,7 +1154,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
let out_base = builder.md_doc_out(self.target).join("rustc");
|
||||
t!(fs::create_dir_all(&out_base));
|
||||
let out_listing = out_base.join("src/lints");
|
||||
builder.cp_r(&builder.src.join("src/doc/rustc"), &out_base);
|
||||
builder.cp_link_r(&builder.src.join("src/doc/rustc"), &out_base);
|
||||
builder.info(&format!("Generating lint docs ({})", self.target));
|
||||
|
||||
let rustc = builder.rustc(self.compiler);
|
||||
|
||||
@@ -1367,7 +1367,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
|
||||
|
||||
let cargo_out =
|
||||
builder.cargo_out(self.compiler, Mode::ToolStd, self.target).join(&lib_name);
|
||||
builder.copy(&cargo_out, &lib);
|
||||
builder.copy_link(&cargo_out, &lib);
|
||||
lib
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
|
||||
}
|
||||
let cargo_out = builder.cargo_out(compiler, self.mode, target).join(exe(tool, target));
|
||||
let bin = builder.tools_dir(compiler).join(exe(tool, target));
|
||||
builder.copy(&cargo_out, &bin);
|
||||
builder.copy_link(&cargo_out, &bin);
|
||||
bin
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
|
||||
t!(fs::create_dir_all(&bindir));
|
||||
let bin_rustdoc = bindir.join(exe("rustdoc", target_compiler.host));
|
||||
let _ = fs::remove_file(&bin_rustdoc);
|
||||
builder.copy(&tool_rustdoc, &bin_rustdoc);
|
||||
builder.copy_link(&tool_rustdoc, &bin_rustdoc);
|
||||
bin_rustdoc
|
||||
} else {
|
||||
tool_rustdoc
|
||||
@@ -686,7 +686,7 @@ fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
|
||||
// so that r-a can use it.
|
||||
let libexec_path = builder.sysroot(self.compiler).join("libexec");
|
||||
t!(fs::create_dir_all(&libexec_path));
|
||||
builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
|
||||
builder.copy_link(&path, &libexec_path.join("rust-analyzer-proc-macro-srv"));
|
||||
|
||||
Some(path)
|
||||
}
|
||||
@@ -765,7 +765,7 @@ fn run(mut $sel, $builder: &Builder<'_>) -> PathBuf {
|
||||
$(for add_bin in $add_bins_to_sysroot {
|
||||
let bin_source = tools_out.join(exe(add_bin, $sel.target));
|
||||
let bin_destination = bindir.join(exe(add_bin, $sel.compiler.host));
|
||||
$builder.copy(&bin_source, &bin_destination);
|
||||
$builder.copy_link(&bin_source, &bin_destination);
|
||||
})?
|
||||
|
||||
let tool = bindir.join(exe($tool_name, $sel.compiler.host));
|
||||
|
||||
+30
-19
@@ -1646,16 +1646,19 @@ fn read_stamp_file(&self, stamp: &Path) -> Vec<(PathBuf, DependencyType)> {
|
||||
paths
|
||||
}
|
||||
|
||||
/// Copies a file from `src` to `dst`
|
||||
pub fn copy(&self, src: &Path, dst: &Path) {
|
||||
self.copy_internal(src, dst, false);
|
||||
/// Links a file from `src` to `dst`.
|
||||
/// Attempts to use hard links if possible, falling back to copying.
|
||||
/// You can neither rely on this being a copy nor it being a link,
|
||||
/// so do not write to dst.
|
||||
pub fn copy_link(&self, src: &Path, dst: &Path) {
|
||||
self.copy_link_internal(src, dst, false);
|
||||
}
|
||||
|
||||
fn copy_internal(&self, src: &Path, dst: &Path, dereference_symlinks: bool) {
|
||||
fn copy_link_internal(&self, src: &Path, dst: &Path, dereference_symlinks: bool) {
|
||||
if self.config.dry_run() {
|
||||
return;
|
||||
}
|
||||
self.verbose_than(1, || println!("Copy {src:?} to {dst:?}"));
|
||||
self.verbose_than(1, || println!("Copy/Link {src:?} to {dst:?}"));
|
||||
if src == dst {
|
||||
return;
|
||||
}
|
||||
@@ -1686,9 +1689,10 @@ fn copy_internal(&self, src: &Path, dst: &Path, dereference_symlinks: bool) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Copies the `src` directory recursively to `dst`. Both are assumed to exist
|
||||
/// Links the `src` directory recursively to `dst`. Both are assumed to exist
|
||||
/// when this function is called.
|
||||
pub fn cp_r(&self, src: &Path, dst: &Path) {
|
||||
/// Will attempt to use hard links if possible and fall back to copying.
|
||||
pub fn cp_link_r(&self, src: &Path, dst: &Path) {
|
||||
if self.config.dry_run() {
|
||||
return;
|
||||
}
|
||||
@@ -1698,24 +1702,31 @@ pub fn cp_r(&self, src: &Path, dst: &Path) {
|
||||
let dst = dst.join(name);
|
||||
if t!(f.file_type()).is_dir() {
|
||||
t!(fs::create_dir_all(&dst));
|
||||
self.cp_r(&path, &dst);
|
||||
self.cp_link_r(&path, &dst);
|
||||
} else {
|
||||
let _ = fs::remove_file(&dst);
|
||||
self.copy(&path, &dst);
|
||||
self.copy_link(&path, &dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Copies the `src` directory recursively to `dst`. Both are assumed to exist
|
||||
/// when this function is called. Unwanted files or directories can be skipped
|
||||
/// when this function is called.
|
||||
/// Will attempt to use hard links if possible and fall back to copying.
|
||||
/// Unwanted files or directories can be skipped
|
||||
/// by returning `false` from the filter function.
|
||||
pub fn cp_filtered(&self, src: &Path, dst: &Path, filter: &dyn Fn(&Path) -> bool) {
|
||||
pub fn cp_link_filtered(&self, src: &Path, dst: &Path, filter: &dyn Fn(&Path) -> bool) {
|
||||
// Immediately recurse with an empty relative path
|
||||
self.recurse_(src, dst, Path::new(""), filter)
|
||||
self.cp_link_filtered_recurse(src, dst, Path::new(""), filter)
|
||||
}
|
||||
|
||||
// Inner function does the actual work
|
||||
fn recurse_(&self, src: &Path, dst: &Path, relative: &Path, filter: &dyn Fn(&Path) -> bool) {
|
||||
fn cp_link_filtered_recurse(
|
||||
&self,
|
||||
src: &Path,
|
||||
dst: &Path,
|
||||
relative: &Path,
|
||||
filter: &dyn Fn(&Path) -> bool,
|
||||
) {
|
||||
for f in self.read_dir(src) {
|
||||
let path = f.path();
|
||||
let name = path.file_name().unwrap();
|
||||
@@ -1726,19 +1737,19 @@ fn recurse_(&self, src: &Path, dst: &Path, relative: &Path, filter: &dyn Fn(&Pat
|
||||
if t!(f.file_type()).is_dir() {
|
||||
let _ = fs::remove_dir_all(&dst);
|
||||
self.create_dir(&dst);
|
||||
self.recurse_(&path, &dst, &relative, filter);
|
||||
self.cp_link_filtered_recurse(&path, &dst, &relative, filter);
|
||||
} else {
|
||||
let _ = fs::remove_file(&dst);
|
||||
self.copy(&path, &dst);
|
||||
self.copy_link(&path, &dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn copy_to_folder(&self, src: &Path, dest_folder: &Path) {
|
||||
fn copy_link_to_folder(&self, src: &Path, dest_folder: &Path) {
|
||||
let file_name = src.file_name().unwrap();
|
||||
let dest = dest_folder.join(file_name);
|
||||
self.copy(src, &dest);
|
||||
self.copy_link(src, &dest);
|
||||
}
|
||||
|
||||
fn install(&self, src: &Path, dstdir: &Path, perms: u32) {
|
||||
@@ -1751,7 +1762,7 @@ fn install(&self, src: &Path, dstdir: &Path, perms: u32) {
|
||||
if !src.exists() {
|
||||
panic!("ERROR: File \"{}\" not found!", src.display());
|
||||
}
|
||||
self.copy_internal(src, &dst, true);
|
||||
self.copy_link_internal(src, &dst, true);
|
||||
chmod(&dst, perms);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ pub(crate) fn add_renamed_file(
|
||||
) {
|
||||
let destdir = self.image_dir.join(destdir.as_ref());
|
||||
t!(std::fs::create_dir_all(&destdir));
|
||||
self.builder.copy(src.as_ref(), &destdir.join(new_name));
|
||||
self.builder.copy_link(src.as_ref(), &destdir.join(new_name));
|
||||
}
|
||||
|
||||
pub(crate) fn add_legal_and_readme_to(&self, destdir: impl AsRef<Path>) {
|
||||
@@ -210,7 +210,7 @@ pub(crate) fn add_dir(&self, src: impl AsRef<Path>, dest: impl AsRef<Path>) {
|
||||
let dest = self.image_dir.join(dest.as_ref());
|
||||
|
||||
t!(std::fs::create_dir_all(&dest));
|
||||
self.builder.cp_r(src.as_ref(), &dest);
|
||||
self.builder.cp_link_r(src.as_ref(), &dest);
|
||||
}
|
||||
|
||||
pub(crate) fn add_bulk_dir(&mut self, src: impl AsRef<Path>, dest: impl AsRef<Path>) {
|
||||
|
||||
@@ -41,6 +41,10 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
|
||||
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
|
||||
|
||||
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
|
||||
# Check library crates on all tier 1 targets.
|
||||
# We disable optimized compiler built-ins because that requires a C toolchain for the target.
|
||||
# We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs.
|
||||
python3 ../x.py check --stage 0 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \
|
||||
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
|
||||
python3 ../x.py clippy compiler -Aclippy::all -Dclippy::correctness && \
|
||||
python3 ../x.py build --stage 0 src/tools/build-manifest && \
|
||||
|
||||
@@ -4,4 +4,4 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies.windows-bindgen]
|
||||
version = "0.52.0"
|
||||
version = "0.55.0"
|
||||
|
||||
Reference in New Issue
Block a user