From e7c99f1a744d8a27dc658f0ab57dcf81d4f2819b Mon Sep 17 00:00:00 2001 From: Paris Morgan Date: Fri, 8 Aug 2025 13:58:40 -0700 Subject: [PATCH 1/3] Disable sandboxing of Swift build to fix errors when building in a Bazel sandbox --- src-rs/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-rs/build.rs b/src-rs/build.rs index 10270d7..f4592f9 100644 --- a/src-rs/build.rs +++ b/src-rs/build.rs @@ -302,6 +302,10 @@ impl SwiftLinker { command // Build the package (duh) .arg("build") + // NOTE(paris): Disable the sandbox because we build inside the Bazel sandbox, which + // has its own sandbox. Without this we fail with: + // - `sandbox-exec: sandbox_apply: Operation not permitted` + .arg("--disable-sandbox") // SDK path for regular compilation (idk) .args(["--sdk", sdk_path.trim()]) // Release/Debug configuration From f74690f3c539a8684bf0a3a30eb81d377979a45a Mon Sep 17 00:00:00 2001 From: Paris Morgan Date: Fri, 8 Aug 2025 14:00:30 -0700 Subject: [PATCH 2/3] Disable sandboxing of Swift build to fix errors when building in a Bazel sandbox From c4ce57b947e97aac9e7157f676d2610e57840c60 Mon Sep 17 00:00:00 2001 From: Paris Morgan Date: Fri, 8 Aug 2025 14:05:42 -0700 Subject: [PATCH 3/3] Disable sandboxing of Swift build to fix errors when building in a Bazel sandbox --- src-rs/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-rs/build.rs b/src-rs/build.rs index f4592f9..654c26f 100644 --- a/src-rs/build.rs +++ b/src-rs/build.rs @@ -302,7 +302,7 @@ impl SwiftLinker { command // Build the package (duh) .arg("build") - // NOTE(paris): Disable the sandbox because we build inside the Bazel sandbox, which + // NOTE(paris): Disable the sandbox because we build inside the Bazel sandbox, which // has its own sandbox. Without this we fail with: // - `sandbox-exec: sandbox_apply: Operation not permitted` .arg("--disable-sandbox")