Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
link.h
Go to the documentation of this file.
1// Copyright 2026 The IREE Authors
2//
3// Licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7#ifndef LOOMC_LINK_H_
8#define LOOMC_LINK_H_
9
10#include "loomc/config.h"
11#include "loomc/link_index.h"
12#include "loomc/module.h"
13#include "loomc/product.h"
14#include "loomc/result.h"
15#include "loomc/target.h"
16#include "loomc/workspace.h"
17
76
77#ifdef __cplusplus
78extern "C" {
79#endif
80
90
110
129
131typedef uint32_t loomc_link_flags_t;
132
134#define LOOMC_ARTIFACT_FORMAT_LINK_PLAN_TEXT "loom-link-plan-text"
135
137typedef enum loomc_link_artifact_flag_bits_e {
142
145
147typedef enum loomc_link_mode_e {
151
158
181
267
297
313 loomc_context_t* context, const loomc_linker_options_t* options,
314 loomc_allocator_t allocator, loomc_linker_t** out_linker);
315
343 const loomc_link_options_t* options,
344 loomc_module_t** out_module, loomc_result_t** out_result);
345
383 loomc_linker_t* linker, loomc_workspace_t* workspace,
384 const loomc_request_t* input_request,
385 const loomc_link_request_options_t* options, loomc_allocator_t allocator,
386 loomc_request_t** out_request, loomc_result_t** out_result);
387
395
404
405#ifdef __cplusplus
406} // extern "C"
407#endif
408
409#endif // LOOMC_LINK_H_
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_structure_type_t
Structure type values used by extensible public descriptors.
Definition base.h:181
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
Text and JSON configuration bindings.
struct loomc_context_t loomc_context_t
Immutable Loom API context.
Definition context.h:63
Opaque in-memory Loom modules.
struct loomc_module_t loomc_module_t
Opaque parsed, linked, optimized, or lowered module.
Definition module.h:90
Immutable compiler products and their recursively published requests.
struct loomc_request_t loomc_request_t
Immutable independently compilable product request.
Definition product.h:167
Shared operation result container.
struct loomc_result_t loomc_result_t
Immutable operation result.
Definition result.h:71
Host allocator used for persistent Loom object storage.
Definition base.h:414
Text configuration bindings and resolution policy shared by API operations.
Definition config.h:78
Linker creation options.
Definition link.h:96
loomc_string_view_t module_name
Default output module name for invocations that do not override it.
Definition link.h:108
loomc_structure_type_t type
Structure type.
Definition link.h:99
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition link.h:102
const void * next
Extension chain for future linker options.
Definition link.h:105
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63
Prepared target environments and target lowering pipelines.
struct loomc_target_profile_t loomc_target_profile_t
Prepared immutable target profile.
Definition target.h:136
Per-worker scratch workspace.
struct loomc_workspace_t loomc_workspace_t
Mutable per-worker scratch workspace.
Definition workspace.h:54