From 4c75f834e7195d05ca4f358aa093003e60380be7 Mon Sep 17 00:00:00 2001 From: joachimschmidt557 Date: Tue, 25 May 2021 10:34:02 +0800 Subject: Re-enable building the self-hosted compiler for 32-bit targets --- src/Module.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 6f0fd7bfb0..0ae6158758 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -1071,7 +1071,7 @@ pub const Scope = struct { if (stat.size > std.math.maxInt(u32)) return error.FileTooBig; - const source = try gpa.allocSentinel(u8, stat.size, 0); + const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0); defer if (!file.source_loaded) gpa.free(source); const amt = try f.readAll(source); if (amt != stat.size) @@ -2441,7 +2441,7 @@ pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node if (stat.size > std.math.maxInt(u32)) return error.FileTooBig; - const source = try gpa.allocSentinel(u8, stat.size, 0); + const source = try gpa.allocSentinel(u8, @intCast(usize, stat.size), 0); defer if (!file.source_loaded) gpa.free(source); const amt = try source_file.readAll(source); if (amt != stat.size) -- cgit v1.2.3