Index: codex-rs/modcargo-crates/v8-146.4.0/build.rs
--- codex-rs/modcargo-crates/v8-146.4.0/build.rs.orig
+++ codex-rs/modcargo-crates/v8-146.4.0/build.rs
@@ -253,7 +253,7 @@ fn build_v8(is_asan: bool) {
     download_ninja_gn_binaries();
   }
 
-  download_rust_toolchain();
+  //download_rust_toolchain();
 
   // `#[cfg(...)]` attributes don't work as expected from build.rs -- they refer to the configuration
   // of the host system which the build.rs script will be running on. In short, `cfg!(target_<os/arch>)`
@@ -275,6 +275,9 @@ fn build_v8(is_asan: bool) {
     "use_custom_libcxx={}",
     env::var("CARGO_FEATURE_USE_CUSTOM_LIBCXX").is_ok()
   ));
+  if target_os == "openbsd" {
+    gn_args.push("use_custom_libunwind=true".to_string());
+  }
 
   let extra_args = {
     if env::var("CARGO_FEATURE_V8_ENABLE_SANDBOX").is_ok() {
@@ -363,9 +366,11 @@ fn build_v8(is_asan: bool) {
   if target_arch == "arm" {
     gn_args.push(r#"target_cpu="arm""#.to_string());
     gn_args.push(r#"v8_target_cpu="arm""#.to_string());
-    gn_args.push("use_sysroot=true".to_string());
-    maybe_install_sysroot("i386");
-    maybe_install_sysroot("arm");
+    if target_os == "linux" {
+      gn_args.push("use_sysroot=true".to_string());
+      maybe_install_sysroot("i386");
+      maybe_install_sysroot("arm");
+    }
   }
 
   let target_triple = env::var("TARGET").unwrap();
@@ -385,7 +390,6 @@ fn build_v8(is_asan: bool) {
     gn_args.push(format!(r#"target_cpu="{arch}""#).to_string());
     gn_args.push(r#"target_os="android""#.to_string());
     gn_args.push("treat_warnings_as_errors=false".to_string());
-    gn_args.push("use_sysroot=true".to_string());
 
     // NDK 23 and above removes libgcc entirely.
     // https://github.com/rust-lang/rust/pull/85806
