Re-enable building the self-hosted compiler for 32-bit targets

This commit is contained in:
joachimschmidt557
2021-05-25 10:34:02 +08:00
committed by Andrew Kelley
parent 8c5d4295e5
commit 4c75f834e7
4 changed files with 7 additions and 7 deletions

View File

@@ -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)