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)
125125 return ()
126126 endif ()
127127
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.
129131 if (Swift_COMPILER_PACKAGE_CMO_SUPPORT STREQUAL "IMPLEMENTED" )
130132 target_compile_options ("${target_name} " PRIVATE
133+ "-enable-library-evolution"
131134 "SHELL:-package-name ${package_name} "
132135 "SHELL:-Xfrontend -package-cmo"
133136 "SHELL:-Xfrontend -allow-non-resilient-access"
134137 )
135138 elseif (Swift_COMPILER_PACKAGE_CMO_SUPPORT STREQUAL "EXPERIMENTAL" )
136139 target_compile_options ("${target_name} " PRIVATE
140+ "-enable-library-evolution"
137141 "SHELL:-package-name ${package_name} "
138142 "SHELL:-Xfrontend -experimental-package-cmo"
139143 "SHELL:-Xfrontend -experimental-allow-non-resilient-access"
You can’t perform that action at this time.
0 commit comments