From 1ba9394e087da87fa0003d148305472b06bc1c74 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Mon, 9 Nov 2026 13:32:56 +0000 Subject: [PATCH] Moves the surrogate from the shared `target\release\build\hls` directory into `target\release\build\hyperlight-host-\out\hls` Signed-off-by: Simon Davies --- src/hyperlight_host/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hyperlight_host/build.rs b/src/hyperlight_host/build.rs index 43c4484e6..3ec2fe181 100644 --- a/src/hyperlight_host/build.rs +++ b/src/hyperlight_host/build.rs @@ -48,9 +48,10 @@ fn main() -> Result<()> { // Note: When we build hyperlight_surrogate.exe CARGO_TARGET_DIR cannot // be the same as the CARGO_TARGET_DIR for the hyperlight-host otherwise - // the build script will hang. Using a sub directory works tho! + // the build script will hang. Keep the separate target directory inside + // OUT_DIR so dependency caches preserve it with the build-script output. // xref - https://github.com/rust-lang/cargo/issues/6412 - let target_dir = out_path.join("../../hls"); + let target_dir = out_path.join("hls"); let profile = std::env::var("PROFILE")?; let build_profile = if profile.to_lowercase() == "debug" {