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/workspace.h"
16
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
80
100
113
115typedef uint32_t loomc_link_flags_t;
116
118typedef enum loomc_link_mode_e {
122
129
184
214
230 loomc_context_t* context, const loomc_linker_options_t* options,
231 loomc_allocator_t allocator, loomc_linker_t** out_linker);
232
260 const loomc_link_options_t* options,
261 loomc_module_t** out_module, loomc_result_t** out_result);
262
297 loomc_linker_t* linker, loomc_workspace_t* workspace,
298 const loomc_request_t* input_request,
299 const loomc_link_request_options_t* options, loomc_allocator_t allocator,
300 loomc_request_t** out_request, loomc_result_t** out_result);
301
309
318
319#ifdef __cplusplus
320} // extern "C"
321#endif
322
323#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:47
Opaque in-memory Loom modules.
struct loomc_module_t loomc_module_t
Opaque parsed, linked, optimized, or lowered module.
Definition module.h:89
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:64
Host allocator used for persistent Loom object storage.
Definition base.h:390
Text configuration options attached to a link or command-product operation.
Definition config.h:77
Linker creation options.
Definition link.h:86
loomc_string_view_t module_name
Default output module name for invocations that do not override it.
Definition link.h:98
loomc_structure_type_t type
Structure type.
Definition link.h:89
loomc_host_size_t structure_size
Size of this structure in bytes.
Definition link.h:92
const void * next
Extension chain for future linker options.
Definition link.h:95
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63
Per-worker scratch workspace.
struct loomc_workspace_t loomc_workspace_t
Mutable per-worker scratch workspace.
Definition workspace.h:54