addModule
Creates a module from the translated source and adds it to the package's
module set making it available to other packages which depend on this one.
createModule can be used instead to create a private module.
Function parameters
Parameters
- translate_c:*TranslateC
- name:[]const u8
Type definitions in this namespace
Types
Functions in this namespace
Functions
- addModule
- Creates a module from the translated source and adds it to the package's
- createModule
- Creates a private module from the translated source to be used by the
- defineCMacro
- If the value is omitted, it is set to 1.
- defineCMacroRaw
- name_and_value looks like [name]=[value].
= .translate_c
Values
- base_id
- = .translate_c
Source
Implementation
pub fn addModule(translate_c: *TranslateC, name: []const u8) *std.Build.Module {
return translate_c.step.owner.addModule(name, .{
.root_source_file = translate_c.getOutput(),
.target = translate_c.target,
.optimize = translate_c.optimize,
.link_libc = translate_c.link_libc,
});
}