mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Package CMO] Diagnose missing library-evolution flag.
This PR ensures library-evolution is enabled for Package CMO; without it, it previously fell back to regular CMO, which caused mismatching serialization attributes if importing another module that had Package CMO enbaled, causing an assert fail for loadable types. Resolves rdar://135308288
This commit is contained in:
@@ -2688,6 +2688,8 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
Diags.diagnose(SourceLoc(), diag::ignoring_option_requires_option,
|
||||
"-package-cmo",
|
||||
"-allow-non-resilient-access");
|
||||
} else if (!FEOpts.EnableLibraryEvolution) {
|
||||
Diags.diagnose(SourceLoc(), diag::package_cmo_requires_library_evolution);
|
||||
} else {
|
||||
Opts.EnableSerializePackage = true;
|
||||
Opts.CMOMode = CrossModuleOptimizationMode::Default;
|
||||
|
||||
Reference in New Issue
Block a user