From 179de2b5d46e781c8e6a934d8185a99cd9c1c045 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sat, 30 Nov 2024 08:26:19 -0500 Subject: [PATCH 1/2] When built with `--release`, `std::process::id` is unused --- dylint/src/library_packages/cargo_cli/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dylint/src/library_packages/cargo_cli/mod.rs b/dylint/src/library_packages/cargo_cli/mod.rs index 86cc9cd74..a62fa8575 100644 --- a/dylint/src/library_packages/cargo_cli/mod.rs +++ b/dylint/src/library_packages/cargo_cli/mod.rs @@ -29,7 +29,6 @@ use std::{ ffi::{OsStr, OsString}, fs::{create_dir_all, read_dir, remove_dir_all, write}, path::{Path, PathBuf}, - process::{id, Output, Stdio}, }; use tempfile::{tempdir, Builder, TempDir}; use url::Url; @@ -270,7 +269,7 @@ fn inject_dummy_dependencies( Ok(injected_dependencies) } -fn cargo_fetch(path: &Path) -> Result { +fn cargo_fetch(path: &Path) -> Result { // smoelius: `cargo fetch` could fail, e.g., if a new checkouts subdirectory had to be created. // But the command should still be executed. // smoelius: Since stdout and stderr are captured, there is no need to use `.quiet(true)`. @@ -283,8 +282,8 @@ fn cargo_fetch(path: &Path) -> Result { "--manifest-path", &path.join("Cargo.toml").to_string_lossy(), ]) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) + .stdout(std::process::Stdio::piped()) + .stderr(std::process::Stdio::piped()) .logged_output(false) } @@ -336,7 +335,7 @@ fn find_accessed_subdir<'a>( #[cfg(debug_assertions)] eprintln!( "{}:{:?}: accessed: {grandparent:?}", - id(), + std::process::id(), std::thread::current().id() ); Ok(Some(Cow::Borrowed(grandparent.as_std_path()))) @@ -355,7 +354,7 @@ fn find_accessed_subdir<'a>( #[cfg(debug_assertions)] eprintln!( "{}:{:?}: pushing: {path:?}", - id(), + std::process::id(), std::thread::current().id() ); accessed.push(Cow::Owned(path.to_path_buf())); From 390555ada66a7154e0ca0937915d8a33fc264a46 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sat, 30 Nov 2024 08:44:21 -0500 Subject: [PATCH 2/2] Update list of architectures --- dylint-link/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dylint-link/src/main.rs b/dylint-link/src/main.rs index 9dd78687e..5888605ec 100644 --- a/dylint-link/src/main.rs +++ b/dylint-link/src/main.rs @@ -251,6 +251,10 @@ const ARCHITECTURES: &[&str] = &[ "powerpc", "powerpc64", "powerpc64le", + "riscv32", + "riscv32e", + "riscv32em", + "riscv32emc", "riscv32gc", "riscv32i", "riscv32im",