0 branches
Tree
Top files
Clone with HTTPS:
cross_directives.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
187 bytes
freestanding_alloc.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
93 bytes
freestanding_directives.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
212 bytes
freestanding_empty.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
26 bytes
freestanding_none.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
175 bytes
freestanding_output.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
41 bytes
freestanding_panic.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
39 bytes
target_directives.vv2
v2: rename vlib/v2 to vlib/v2_toberemoved and update references
last Jun 19
201 bytes
Target Codegen Example
This is a V2 fixture for target-specific cleanc generation.
It is intentionally stored as .vv2 source so shared V1/vfmt paths do not parse
V2-only or experimental command-line contracts directly. The builder E2E test
reads these files, writes them as temporary .v files, and runs the real
cmd/v2 CLI.
The fixture is a compact demonstration of the supported user-facing contract:
- implicit host OS selection when
-osis omitted; - explicit
-osoverrides for concrete targets; -os crosspreserving portable directive guards;- pure
-freestanding -os nonegeneration with no concrete OS selected; - advanced
-fhooksisolation with--skip-builtin --skip-type-check; - capability-specific
output,panic, andallochook behavior.
V2 uses cleanc by default. -b is only needed when selecting a non-default
backend explicitly.
The regression tests keep unsupported/error-only programs inline in the test file, so this directory stays readable as an example rather than a catalogue of expected failures.
Fixture roles:
target_directives.vv2: host/default target and concrete-osoverrides.cross_directives.vv2:-os crosspreserving portable directive guards.freestanding_directives.vv2: freestanding target directive selection.freestanding_none.vv2: pure-freestanding -os noneplatform contract.freestanding_output.vv2:outputhook example.freestanding_panic.vv2:panichook example.freestanding_alloc.vv2:allochook example.freestanding_empty.vv2: minimal source used for runtime-contract checks.