Skip to main content

Module build_c

Module build_c 

Source
Expand description

The C build: largo build [--release] --emit c|c-bytecode.

The Rust build with another backend. The same two profiles, the artifact published at target/<mode>/<name>, and the generated source kept in the build directory beside it (target/<mode>/build-c/main.c, where the Rust build keeps build/src/main.rs). The C compiler is $CC, default cc.

profileflags
debugC_DEBUG_FLAGS
releaseC_RELEASE_FLAGS — the flags the benchmark suite builds its hand-written C with

A release build strips its symbol table, as the Rust release profile does. The same override the Rust build honours keeps it: CARGO_PROFILE_RELEASE_STRIP=false (or none).

Enums§

CLowering
Which LOGOS → C lowering a C build runs.

Constants§

C_DEBUG_FLAGS
The optimization flags of a debug C build.
C_RELEASE_FLAGS
The optimization flags of a release C build: full optimization, the host CPU, link-time optimization, and no floating-point contraction — a*b + c stays two rounded operations, as it is on the Rust tier and the VM, so every tier computes the same bits.

Functions§

c_compiler
The C compiler a build runs: $CC, else cc.
c_compiler_args
The complete compiler argument list for source → output under release, linking links after the source: what the generated C asks for beyond the C library (the exact extension’s value runtime, logicaffeine_compile::codegen_c::value_runtime::link_args).