https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/243244
expandResponseFiles() created the llvm::cl::ExpansionContext without a file system and only set the provided VFS afterwards. The constructor falls back to vfs::getRealFileSystem() when no file system is given, so the real file system was always obtained even when the caller provided a VFS. With the IO sandbox enabled, this is a sandbox violation, e.g. when the dependency scanner builds a compilation for a by-name query. Pass the VFS to the constructor instead. >From 20b316d4d864e7985c275e057ab2c0e9d52ba352 Mon Sep 17 00:00:00 2001 From: Steven Wu <[email protected]> Date: Mon, 16 Nov 2026 14:23:28 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?q?l=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.7 --- clang/lib/Driver/Driver.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 9d95f69f1bbfe1..54daa1c4fb5c5d 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -6676,10 +6676,8 @@ llvm::Error driver::expandResponseFiles(SmallVectorImpl<const char *> &Args, if (MarkEOLs && Args.size() > 1 && StringRef(Args[1]).starts_with("-cc1")) MarkEOLs = false; - llvm::cl::ExpansionContext ECtx(Alloc, Tokenizer); + llvm::cl::ExpansionContext ECtx(Alloc, Tokenizer, FS); ECtx.setMarkEOLs(MarkEOLs); - if (FS) - ECtx.setVFS(FS); if (llvm::Error Err = ECtx.expandResponseFiles(Args)) return Err; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
