From b047294c87962a67b3197179a22cb62f8c7ac565 Mon Sep 17 00:00:00 2001 From: Ronny Chan Date: Thu, 24 Oct 2024 13:08:06 -0400 Subject: [PATCH] set cargo linker --- build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.rs b/build.rs index 10f45f32..8107d2ac 100644 --- a/build.rs +++ b/build.rs @@ -265,6 +265,14 @@ fn build_v8(is_asan: bool) { target.replace("-unknown-", "-") ), ); + env::set_var( + format!("CARGO_TARGET_{}_LINKER", target.replace('-', "_")), + format!( + "{}/bin/{}-gcc", + toolchain.display(), + target.replace("-unknown-", "-") + ), + ); } if let Some(p) = env::var_os("SCCACHE") {