mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Embedded] Introduce DeferredCodeGen feature.
Introduce an experimental feature DeferredCodeGen, that defers the generation of LLVM IR (and therefore object code) for all entities within an Embedded Swift module unless they have explicitly requested to not be emitted into the client (e.g., with `@_neverEmitIntoClient`). This feature is meant to generalize and subsume -emit-empty-object-file, relying on lazy emission of entities rather than abruptly ending the compilation pipeline before emitting any IR. Part of rdar://158363967.
This commit is contained in:
@@ -324,6 +324,12 @@ EXPERIMENTAL_FEATURE(KeyPathWithMethodMembers, false)
|
||||
// Whether to enable @_used and @_section attributes
|
||||
EXPERIMENTAL_FEATURE(SymbolLinkageMarkers, true)
|
||||
|
||||
// Whether to emit an Embedded Swift module with "deferred" code generation,
|
||||
// meaning that the only code that will be emitted into the object file is
|
||||
// code that was marked as "never emit into client". For everything else,
|
||||
// Swift still store the SIL and emit it into the client only when used.
|
||||
EXPERIMENTAL_FEATURE(DeferredCodeGen, true)
|
||||
|
||||
// Whether to compile scripts lazily in immediate mode
|
||||
EXPERIMENTAL_FEATURE(LazyImmediate, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user