From 7875b6b427e2c055285d58a120f4998477aa702b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 15 Jan 2018 00:14:14 -0700 Subject: [PATCH] Pass -sil-merge-partial-modules flag The build scripts for foundation bypass the Swift driver and use the -frontend mode directly. The command line interface for -frontend is not officially supported and is subject to change. A recent change was that when merging partial modules to form a final module file, the -sil-merge-partial-modules flag must be passed in so that serialized SIL can be preserved in the final module file. Preserving serialized SIL is now a requirement, since soon default argument generators and stored property initializers will be emitted with non-public linkage, requiring clients to deserialize SIL when calling these entry points. --- lib/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/script.py b/lib/script.py index 150eb95d48..550b04d29d 100644 --- a/lib/script.py +++ b/lib/script.py @@ -189,7 +189,7 @@ def generate_products(self): depfile = $out.d rule MergeSwiftModule - command = mkdir -p `dirname $out`; ${SWIFT} -frontend -emit-module $partials ${TARGET_SWIFTCFLAGS} $flags -module-cache-path ${MODULE_CACHE_PATH} -module-link-name $module_name -o $out + command = mkdir -p `dirname $out`; ${SWIFT} -frontend -sil-merge-partial-modules -emit-module $partials ${TARGET_SWIFTCFLAGS} $flags -module-cache-path ${MODULE_CACHE_PATH} -module-link-name $module_name -o $out description = Merge $out """