authorgravatar for gviegas@users.noreply.github.comGustavo C. Viegas <gviegas@users.noreply.github.com> 2024-01-29 23:54:22-03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2024-01-31 02:46:05+02:00
logfc48bbdf90bbfa0ed1f5a95e9e5412351d1df6d7
treeefa1df2d76a100d6aa2762de156c2851f22ffb6a
parentf63f4508d228e37965865221220f4f94103111cf

std.Build.Step.TranslateC: fix use of outdated Module in createModule


1 files changed, 2 insertions(+), 8 deletions(-)

lib/std/Build/Step/TranslateC.zig+2-8
......@@ -87,15 +87,9 @@ pub fn addModule(self: *TranslateC, name: []const u8) *std.Build.Module {
8787/// current package, but not exposed to other packages depending on this one.
8888/// `addModule` can be used instead to create a public module.
8989pub fn createModule(self: *TranslateC) *std.Build.Module {
90 const b = self.step.owner;
91 const module = b.allocator.create(std.Build.Module) catch @panic("OOM");
92
93 module.* = .{
94 .builder = b,
90 return self.step.owner.createModule(.{
9591 .root_source_file = self.getOutput(),
96 .dependencies = std.StringArrayHashMap(*std.Build.Module).init(b.allocator),
97 };
98 return module;
92 });
9993}
10094
10195pub fn addIncludeDir(self: *TranslateC, include_dir: []const u8) void {