mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Enforce consistent usage of -experimental-hermetic-seat-at-link flag (#39986)
We've recently added the -experimental-hermetic-seal-at-link compiler flag, which turns on aggressive dead-stripping optimizations and assumes that library code can be optimized against client code because all users of the library code/types are present at link/LTO time. This means that any module that's built with -experimental-hermetic-seal-at-link requires all clients of this module to also use -experimental-hermetic-seal-at-link. This PR enforces that by storing a bit in the serialized module, and checking the bit when importing modules.
This commit is contained in:
committed by
GitHub
parent
775c632d03
commit
c89eca6c34
@@ -330,10 +330,13 @@ private:
|
||||
unsigned ArePrivateImportsEnabled : 1;
|
||||
|
||||
/// Whether this module file is actually a .sib file.
|
||||
unsigned IsSIB: 1;
|
||||
unsigned IsSIB : 1;
|
||||
|
||||
/// Whether this module is compiled as static library.
|
||||
unsigned IsStaticLibrary: 1;
|
||||
unsigned IsStaticLibrary : 1;
|
||||
|
||||
/// Whether this module was built with -experimental-hermetic-seal-at-link.
|
||||
unsigned HasHermeticSealAtLink : 1;
|
||||
|
||||
/// Whether this module file is compiled with '-enable-testing'.
|
||||
unsigned IsTestable : 1;
|
||||
|
||||
Reference in New Issue
Block a user