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
114
116typedef uint32_t loomc_link_flags_t;
117
119typedef enum loomc_link_mode_e {
123
130
188
218
234 loomc_context_t* context, const loomc_linker_options_t* options,
235 loomc_allocator_t allocator, loomc_linker_t** out_linker);
236
264 const loomc_link_options_t* options,
265 loomc_module_t** out_module, loomc_result_t** out_result);
266
304 loomc_linker_t* linker, loomc_workspace_t* workspace,
305 const loomc_request_t* input_request,
306 const loomc_link_request_options_t* options, loomc_allocator_t allocator,
307 loomc_request_t** out_request, loomc_result_t** out_result);
308
316
325
326#ifdef __cplusplus
327} // extern "C"
328#endif
329
330#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:71
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