diff options
| author | joachimschmidt557 <joachim.schmidt557@outlook.com> | 2021-05-25 10:34:02 +0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-25 15:38:32 -0400 |
| commit | 4c75f834e7195d05ca4f358aa093003e60380be7 (patch) | |
| tree | 23c0e8998a21e7f5c0d8e08bc580c3a449e92174 /src/Module.zig | |
| parent | 8c5d4295e5f6459ba99d219c1922a30ec6da24bf (diff) | |
| download | zig-4c75f834e7195d05ca4f358aa093003e60380be7.tar.gz zig-4c75f834e7195d05ca4f358aa093003e60380be7.zip | |
Re-enable building the self-hosted compiler for 32-bit targets
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
