iter emit-ir-staticlib: ail emit-ir --emit=staticlib (M1 fieldtest spec_gap#2)
Restores the Decision-5 IR-readability affordance for main-free
kernels: ail emit-ir gains --emit=staticlib, symmetric with
ail build, reusing the M1-audited Target::StaticLib path via a new
one-line lower_workspace_staticlib convenience. Zero-export guard
byte-identical to build_staticlib's. DESIGN.md widened (not
narrowed) + a pre-existing M1 synopsis omission corrected. 3 new
E2E tests; no fixture minted, no doc pin (E2E is the coverage).
Plan 03493c9.
This commit is contained in:
@@ -276,6 +276,18 @@ pub fn lower_workspace(ws: &Workspace) -> Result<String> {
|
||||
lower_workspace_inner(ws, AllocStrategy::Gc, Target::Executable)
|
||||
}
|
||||
|
||||
/// Embedding-ABI M1 single-call entry point symmetric with
|
||||
/// [`lower_workspace`]: lowers a [`Workspace`] for the static-library
|
||||
/// target with the default `AllocStrategy::Gc`. This is what
|
||||
/// `ail emit-ir --emit=staticlib` calls so an author can read a
|
||||
/// `main`-free kernel's IR (the external `@<sym>` forwarders, no
|
||||
/// `@main`) — the Decision-5 IR-readability affordance for the
|
||||
/// artefact M1 introduced. Equivalent to
|
||||
/// `lower_workspace_staticlib_with_alloc(ws, AllocStrategy::Gc)`.
|
||||
pub fn lower_workspace_staticlib(ws: &Workspace) -> Result<String> {
|
||||
lower_workspace_inner(ws, AllocStrategy::Gc, Target::StaticLib)
|
||||
}
|
||||
|
||||
fn lower_workspace_inner(ws: &Workspace, alloc: AllocStrategy, target: Target) -> Result<String> {
|
||||
// Iter 16a: desugar every module before any lowering work runs.
|
||||
// The pass is idempotent and structurally identical to what
|
||||
|
||||
Reference in New Issue
Block a user