Risks of compiler warning: 'Module was not compiled with library evolution support'

Stable module interfaces (-emit-module-interface flag) requires library evolution support (-enable-library-evolution). If you enable the former but not the latter, the compiler will produce an invalid module interface file that will cause runtime crashes when used.

If a library A depends on a library B, and A is built with stable module interfaces and library evolution, B must also be built with stable module interfaces and library evolution, unless A only imports B using an @_implementationOnly import, in which case it is safe for B to be built without module stability and library evolution, since in that case you know that B is not part of A's ABI.

1 Like