Skip to content

Commit 86d241b

Browse files
committed
Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging modules, since that's completely unnecessary. An evolution test that used to fail with WMO disabled now passes with this change. FIxes <rdar://problem/18913977>.
1 parent da2fb2f commit 86d241b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

lib/Driver/ToolChains.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,14 @@ ToolChain::constructInvocation(const MergeModuleJobAction &job,
687687
// serialized ASTs.
688688
Arguments.push_back("-parse-as-library");
689689

690+
// Merge serialized SIL from partial modules.
691+
Arguments.push_back("-sil-merge-partial-modules");
692+
693+
// Disable SIL optimization passes; we've already optimized the code in each
694+
// partial mode.
695+
Arguments.push_back("-disable-diagnostic-passes");
696+
Arguments.push_back("-disable-sil-perf-optzns");
697+
690698
addCommonFrontendArgs(*this, context.OI, context.Output, context.Args,
691699
Arguments);
692700
context.Args.AddLastArg(Arguments, options::OPT_import_objc_header);

validation-test/Evolution/test_function_change_transparent_body.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
// RUN: %target-resilience-test-wmo
1+
// RUN: %target-resilience-test
22
// REQUIRES: executable_test
33

4-
// FIXME: shouldn't need -whole-module-optimization here; we need to fix the
5-
// frontend to merge serialized SIL functions from different translation units
6-
74
import StdlibUnittest
85
import function_change_transparent_body
96

0 commit comments

Comments
 (0)