Skip to content

Commit 7875b6b

Browse files
committed
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.
1 parent 7359ea7 commit 7875b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/script.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def generate_products(self):
189189
depfile = $out.d
190190
191191
rule MergeSwiftModule
192-
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
192+
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
193193
description = Merge $out
194194
"""
195195

0 commit comments

Comments
 (0)