pub const CreateOptions = struct root_source_file: ?LazyPath = nullThis could either be a generated file, in which case the module contains exactly one file, or it could be a path to the root source file of directory of files which constitute the module. If null, it means this module is made up of only link_objects.
imports: []const Import = &.{}The table of other modules that this module can access via @import. Imports are allowed to be cyclical, so this table can be added to after the Module is created via addImport.
target: ?std.Build.ResolvedTarget = nulloptimize: ?std.builtin.Optimize = nulllink_libc: ?bool = nulltrue requires a compilation that includes this Module to link libc. false causes a build failure if a compilation that includes this Module would link libc. null neither requires nor prevents libc from being linked.
link_libcpp: ?bool = nulltrue requires a compilation that includes this Module to link libc++. false causes a build failure if a compilation that includes this Module would link libc++. null neither requires nor prevents libc++ from being linked.
single_threaded: ?bool = nullstrip: ?bool = nullunwind_tables: ?std.builtin.UnwindTables = nulldwarf_format: ?std.dwarf.Format = nullcode_model: std.builtin.CodeModel = .defaultstack_protector: ?bool = nullstack_check: ?bool = nullsanitize_c: ?std.zig.SanitizeC = nullsanitize_thread: ?bool = nullfuzz: ?bool = nullvalgrind: ?bool = nullWhether to emit machine code that integrates with Valgrind.
pic: ?bool = nullPosition Independent Code
red_zone: ?bool = nullomit_frame_pointer: ?bool = nullWhether to omit the stack frame pointer. Frees up a register and makes it more difficult to obtain stack traces. Has target-dependent effects.
error_tracing: ?bool = nullno_builtin: ?bool = null190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233pub const CreateOptions = struct {
/// This could either be a generated file, in which case the module
/// contains exactly one file, or it could be a path to the root source
/// file of directory of files which constitute the module.
/// If `null`, it means this module is made up of only `link_objects`.
root_source_file: ?LazyPath = null,
/// The table of other modules that this module can access via `@import`.
/// Imports are allowed to be cyclical, so this table can be added to after
/// the `Module` is created via `addImport`.
imports: []const Import = &.{},
target: ?std.Build.ResolvedTarget = null,
optimize: ?std.builtin.Optimize = null,
/// `true` requires a compilation that includes this Module to link libc.
/// `false` causes a build failure if a compilation that includes this Module would link libc.
/// `null` neither requires nor prevents libc from being linked.
link_libc: ?bool = null,
/// `true` requires a compilation that includes this Module to link libc++.
/// `false` causes a build failure if a compilation that includes this Module would link libc++.
/// `null` neither requires nor prevents libc++ from being linked.
link_libcpp: ?bool = null,
single_threaded: ?bool = null,
strip: ?bool = null,
unwind_tables: ?std.builtin.UnwindTables = null,
dwarf_format: ?std.dwarf.Format = null,
code_model: std.builtin.CodeModel = .default,
stack_protector: ?bool = null,
stack_check: ?bool = null,
sanitize_c: ?std.zig.SanitizeC = null,
sanitize_thread: ?bool = null,
fuzz: ?bool = null,
/// Whether to emit machine code that integrates with Valgrind.
valgrind: ?bool = null,
/// Position Independent Code
pic: ?bool = null,
red_zone: ?bool = null,
/// Whether to omit the stack frame pointer. Frees up a register and makes it
/// more difficult to obtain stack traces. Has target-dependent effects.
omit_frame_pointer: ?bool = null,
error_tracing: ?bool = null,
no_builtin: ?bool = null,
}
Unspecified options here will be inherited from parent
Modulewhen inserted into an import table.