File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -125,15 +125,19 @@ function(_set_pure_swift_package_options target_name package_name)
125
125
return ()
126
126
endif ()
127
127
128
- # Enable package CMO if possible
128
+ # Enable package CMO if possible.
129
+ # NOTE: '-enable-library-evolution' is required for package CMO even when we
130
+ # don't need '.swiftinterface'. E.g. executables.
129
131
if (Swift_COMPILER_PACKAGE_CMO_SUPPORT STREQUAL "IMPLEMENTED" )
130
132
target_compile_options ("${target_name} " PRIVATE
133
+ "-enable-library-evolution"
131
134
"SHELL:-package-name ${package_name} "
132
135
"SHELL:-Xfrontend -package-cmo"
133
136
"SHELL:-Xfrontend -allow-non-resilient-access"
134
137
)
135
138
elseif (Swift_COMPILER_PACKAGE_CMO_SUPPORT STREQUAL "EXPERIMENTAL" )
136
139
target_compile_options ("${target_name} " PRIVATE
140
+ "-enable-library-evolution"
137
141
"SHELL:-package-name ${package_name} "
138
142
"SHELL:-Xfrontend -experimental-package-cmo"
139
143
"SHELL:-Xfrontend -experimental-allow-non-resilient-access"
You can’t perform that action at this time.
0 commit comments