mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Macros] Add option to disable sandbox for exectuable plugins
`-disable-sandbox` to disable sandboxing when invoking subprocess from from the frontend. Since `sandbox(7)` in macOS doesn't support nested sandbox, complation used to fail when the parent build process is sandboxed.
This commit is contained in:
@@ -812,8 +812,9 @@ bool CompilerInstance::setUpModuleLoaders() {
|
||||
|
||||
bool CompilerInstance::setUpPluginLoader() {
|
||||
/// FIXME: If Invocation has 'PluginRegistry', we can set it. But should we?
|
||||
auto loader =
|
||||
std::make_unique<PluginLoader>(*Context, getDependencyTracker());
|
||||
auto loader = std::make_unique<PluginLoader>(
|
||||
*Context, getDependencyTracker(),
|
||||
Invocation.getFrontendOptions().DisableSandbox);
|
||||
Context->setPluginLoader(std::move(loader));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user