mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: Add a new -sil-merge-partial-modules flag
Previously we would drop all serialized SIL from partial swiftmodule files generated while compiling source in non-WMO mode; all that was missing was linking it in. This adds a frontend flag, and a test; driver change is coming up next. Progress on <rdar://problem/18913977>.
This commit is contained in:
@@ -625,6 +625,9 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
|
||||
if (Invocation.getSILOptions().LinkMode == SILOptions::LinkAll)
|
||||
performSILLinking(SM.get(), true);
|
||||
|
||||
if (Invocation.getSILOptions().MergePartialModules)
|
||||
SM->linkAllFromCurrentModule();
|
||||
|
||||
{
|
||||
SharedTimer timer("SIL verification, pre-optimization");
|
||||
SM->verify();
|
||||
|
||||
Reference in New Issue
Block a user