Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
loomc_link_options_t Struct Reference

Link invocation options. More...

#include <link.h>

Data Fields

loomc_structure_type_t type
 Structure type. Must be LOOMC_STRUCTURE_TYPE_LINK_OPTIONS when nonzero.
loomc_host_size_t structure_size
 Size of this structure in bytes.
const void * next
 Optional invocation extensions such as loomc_target_specialization_options_t.
loomc_link_index_tlink_index
 Frozen provider index to link.
loomc_string_view_t module_name
 Output module name for this invocation. Empty uses the linker's default.
loomc_link_mode_t mode
 Product selection mode. Zero defaults to LOOMC_LINK_MODE_MERGE.
const loomc_string_view_troot_symbols
 Root symbol names for link mode.
loomc_host_size_t root_symbol_count
 Number of entries in root_symbols.
loomc_link_flags_t flags
 Link operation flags.
loomc_config_options_t config
 Per-invocation config bindings materialized into the linked output module.
const loomc_host_size_troot_provider_ordinals
 Provider ordinals whose exported symbols are roots in link mode.
loomc_host_size_t root_provider_count
 Number of entries in root_provider_ordinals.

Detailed Description

Link invocation options.

A link invocation consumes a frozen index and returns either a retained module or a failed result with diagnostics. Merge mode materializes only primary INPUT providers and preserves unresolved contracts. Link mode selects a dependency closure from explicit roots or exported primary roots plus the exports of selected root providers across the complete supplied library universe. Linking preserves every target carried by the selected symbols. Target-specialization extensions participate in template-provider selection and project exact target facts into the standalone linked output. Config options materialize on the linked output for this invocation; frozen indexes and reusable input/library modules are never mutated by link-time specialization.

Field Documentation

◆ root_provider_ordinals

const loomc_host_size_t* loomc_link_options_t::root_provider_ordinals

Provider ordinals whose exported symbols are roots in link mode.

This selects public API surfaces without changing provider linkage roles or making private symbols visible across provider boundaries.

◆ root_symbols

const loomc_string_view_t* loomc_link_options_t::root_symbols

Root symbol names for link mode.

Function-like roots are retained as module-boundary entries in the linked output.


The documentation for this struct was generated from the following file: