mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Support Package CMO
* Add a new flag -experimental-package-cmo that requires -experimental-allow-non-resilient-access. * Support serializing package decls for CMO in package if enabled. * Only applies to default mode CMO. * Unlike the existing CMO, package CMO can be built with -enable-library-evolution as package modules are required to be built together in the same project. * Create hasPublicOrPackageVisibility to opt in for package decls; needed for CMO, SILVerifier, and other call sites that verify or determine codegen. Resolves rdar://121976014
This commit is contained in:
@@ -898,8 +898,8 @@ bool SILFunction::hasValidLinkageForFragileRef() const {
|
||||
isAvailableExternally())
|
||||
return false;
|
||||
|
||||
// Otherwise, only public functions can be referenced.
|
||||
return hasPublicVisibility(getLinkage());
|
||||
// Otherwise, only public or package functions can be referenced.
|
||||
return hasPublicOrPackageVisibility(getLinkage(), getModule().getOptions().EnableSerializePackage);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user