|
Loom C API
Public Loom compiler C API
|
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_t * | link_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_t * | root_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_t * | root_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. | |
| const loomc_link_module_provider_t * | module_providers |
| Invocation-local materialized module providers appended after the optional frozen library prefix. | |
| loomc_host_size_t | module_provider_count |
| Number of entries in module_providers. | |
| const loomc_target_profile_t * | target_profile |
| Optional homogeneous execution profile applied before dependency and template selection. | |
| loomc_link_artifact_flags_t | artifact_flags |
| Optional reports owned by the returned result, independently of the module, index, and workspace. | |
Link invocation options.
A link invocation consumes a frozen index, invocation-local materialized modules, or both 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, exported primary roots, or primary test/benchmark 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. Template choices that depend on unavailable caller or target facts retain their viable providers until compilation. A closed library universe does not require template applicability to be resolved at the link boundary.
| loomc_link_artifact_flags_t loomc_link_options_t::artifact_flags |
Optional reports owned by the returned result, independently of the module, index, and workspace.
Zero performs no report formatting. Requires structure_size to include this field.
| loomc_link_index_t* loomc_link_options_t::link_index |
Frozen provider index to link.
Required when module_provider_count is zero. When materialized module providers are present this may be NULL or a library-only index used as the immutable provider prefix.
| const loomc_link_module_provider_t* loomc_link_options_t::module_providers |
Invocation-local materialized module providers appended after the optional frozen library prefix.
Provider ordinals in this combined index retain the frozen prefix ordinals and then follow this array order.
| 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.
| 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.
| const loomc_target_profile_t* loomc_link_options_t::target_profile |
Optional homogeneous execution profile applied before dependency and template selection.
Every selected kernel entry uses the profile. Any other materialized function also uses it when its authored target still resolves to target.decl. Targetless functions remain target-neutral, and functions with concrete targets retain their authored context.
Borrowed for the call. NULL preserves authored targets. Cannot be combined with nonempty explicit target specializations or declaration bindings in next. Requires structure_size to include this field.