[llvm] Reapply "[llvm][clang] Enable IO sandbox for assert builds" (PR #184545)

Jan Svoboda via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 20:47:21 PST 2026


https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/184545

This reverts #173074 and essentially reapplies #171935. The main reason for the revert was an omission where we were not sandboxing direct clang -cc1 invocations in our test suite, leading to sandbox violations reported by Clang users. This was rectified in #174653 after a number of patches fixing such sandbox violations.

>From 6cec974bc5b0cf09fbd38f32daf3c55285951495 Mon Sep 17 00:00:00 2001
From: Jan Svoboda <jan_svoboda at apple.com>
Date: Tue, 3 Mar 2026 20:42:04 -0800
Subject: [PATCH] Reapply "[llvm][clang] Enable IO sandbox for assert builds"

This reverts #173074 and essentially reapplies #171935. The main reason for the revert was not sandboxing direct clang -cc1 invocations and resulting low test coverage. This was rectified in #174653 after a number of patches fixing discovered sandbox violations.
---
 llvm/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index dbf8b9e4aa661..ed82054734293 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -700,7 +700,7 @@ else()
   option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
 endif()
 
-option(LLVM_ENABLE_IO_SANDBOX "Enable IO sandboxing in supported tools" OFF)
+option(LLVM_ENABLE_IO_SANDBOX "Enable IO sandboxing in supported tools" ${LLVM_ENABLE_ASSERTIONS})
 option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
 
 set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING



More information about the llvm-commits mailing list