mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Propagate '-application-extension' to module interface loader sub-invocations.
This flag restricts availability of certain symbols to ensure the code cannot use declarations that are explicitly unavalable to extensions. This restriction should be passed down to dependency modules also.
This commit is contained in:
@@ -1559,6 +1559,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
||||
genericSubInvocation.getFrontendOptions().DisableImplicitModules = true;
|
||||
GenericArgs.push_back("-disable-implicit-swift-modules");
|
||||
}
|
||||
// If building an application extension, make sure API use
|
||||
// is restricted accordingly in downstream dependnecies.
|
||||
if (langOpts.EnableAppExtensionRestrictions) {
|
||||
GenericArgs.push_back("-application-extension");
|
||||
}
|
||||
// Save the parent invocation's Target Triple
|
||||
ParentInvocationTarget = langOpts.Target;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user