Function create [src]

Prototype

pub fn create(owner: *std.Build, options: Options) *TranslateC

Parameters

owner: *std.Buildoptions: Options

Source

pub fn create(owner: *std.Build, options: Options) *TranslateC { const translate_c = owner.allocator.create(TranslateC) catch @panic("OOM"); const source = options.root_source_file.dupe(owner); translate_c.* = .{ .step = Step.init(.{ .id = base_id, .name = "translate-c", .owner = owner, .makeFn = make, }), .source = source, .include_dirs = std.ArrayList(std.Build.Module.IncludeDir).init(owner.allocator), .c_macros = std.ArrayList([]const u8).init(owner.allocator), .out_basename = undefined, .target = options.target, .optimize = options.optimize, .output_file = .{ .step = &translate_c.step }, .link_libc = options.link_libc, .use_clang = options.use_clang, }; source.addStepDependencies(&translate_c.step); return translate_c; }