about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-10-17 05:05:07 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2023-10-17 05:05:07 +0000
commit2ca415c1c2fc7991027a1cfa332e305b4f27a0f8 (patch)
treea072b8ca50207f8ed55e085580de73b0e37802f3 /src/bootstrap/lib.rs
parent8fa1b6aad2bd14fa2477daf8eeab69464e8878a5 (diff)
parenteccc9e66287d5fd141e458ae3ab25ac96a567972 (diff)
downloadrust-2ca415c1c2fc7991027a1cfa332e305b4f27a0f8.tar.gz
rust-2ca415c1c2fc7991027a1cfa332e305b4f27a0f8.zip
Merge from rustc
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 5c78015e560..a9a81cb25f6 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -138,18 +138,9 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &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),
@@ -368,6 +359,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
             }