From ea1066d0be97979f19bb05151c39aa22f8782398 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 3 Oct 2023 22:27:25 -0400 Subject: Bump to latest beta --- src/bootstrap/lib.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/bootstrap/lib.rs') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 5c78015e560..6671f816e57 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -138,18 +138,9 @@ const EXTRA_CHECK_CFGS: &[(Option, &str, Option<&[&'static str]>)] = &[ (Some(Mode::Std), "freebsd13", None), (Some(Mode::Std), "backtrace_in_libstd", None), /* Extra values not defined in the built-in targets yet, but used in std */ - // #[cfg(bootstrap)] - (Some(Mode::Std), "target_vendor", Some(&["unikraft"])), (Some(Mode::Std), "target_env", Some(&["libnx"])), - // #[cfg(bootstrap)] hurd - (Some(Mode::Std), "target_os", Some(&["teeos", "hurd"])), - (Some(Mode::Rustc), "target_os", Some(&["hurd"])), - // #[cfg(bootstrap)] mips32r6, mips64r6 - ( - Some(Mode::Std), - "target_arch", - Some(&["asmjs", "spirv", "nvptx", "xtensa", "mips32r6", "mips64r6", "csky"]), - ), + // (Some(Mode::Std), "target_os", Some(&[])), + (Some(Mode::Std), "target_arch", Some(&["asmjs", "spirv", "nvptx", "xtensa"])), /* Extra names used by dependencies */ // FIXME: Used by serde_json, but we should not be triggering on external dependencies. (Some(Mode::Rustc), "no_btreemap_remove_entry", None), -- cgit 1.4.1-3-g733a5 From 86e9b0f0d4881787bed2ff77d3bb6db56d077ee2 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Mon, 9 Oct 2023 21:43:33 +0300 Subject: add `SAFETY` block on usage of unsafe `getuid` Signed-off-by: onur-ozkan --- src/bootstrap/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bootstrap/lib.rs') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 5c78015e560..0ac856479f8 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -368,6 +368,10 @@ impl Build { // https://github.com/rust-lang/rust/blob/a8a33cf27166d3eabaffc58ed3799e054af3b0c6/src/bootstrap/bootstrap.py#L796-L797 let is_sudo = match env::var_os("SUDO_USER") { Some(_sudo_user) => { + // SAFETY: getuid() system call is always successful and no return value is reserved + // to indicate an error. + // + // For more context, see https://man7.org/linux/man-pages/man2/geteuid.2.html let uid = unsafe { libc::getuid() }; uid == 0 } -- cgit 1.4.1-3-g733a5