Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion toolchain/private/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _target_linux_gnu(gocpu, zigcpu, glibc_version):
linkopts = [],
dynamic_library_linkopts = [],
supports_dynamic_linker = True,
copts = [],
copts = ["-D_GNU_SOURCE"],
libc = "glibc",
bazel_target_cpu = "k8",
constraint_values = [
Expand Down Expand Up @@ -207,6 +207,7 @@ def _target_wasm():
zigtarget = "wasm32-wasi-musl",
includes = [
"libc/include/wasm-wasi-musl",
"libc/include/generic-musl",
"libc/wasi",
] + _INCLUDE_TAIL,
linkopts = [],
Expand Down
14 changes: 7 additions & 7 deletions toolchain/private/zig_sdk.bzl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
VERSION = "0.12.0"
VERSION = "0.14.0"

HOST_PLATFORM_SHA256 = {
"linux-aarch64": "754f1029484079b7e0ca3b913a0a2f2a6afd5a28990cb224fe8845e72f09de63",
"linux-x86_64": "c7ae866b8a76a568e2d5cfd31fe89cdb629bdd161fdd5018b29a4a0a17045cad",
"macos-aarch64": "294e224c14fd0822cfb15a35cf39aa14bd9967867999bf8bdfe3db7ddec2a27f",
"macos-x86_64": "4d411bf413e7667821324da248e8589278180dbc197f4f282b7dbb599a689311",
"windows-aarch64": "04c6b92689241ca7a8a59b5f12d2ca2820c09d5043c3c4808b7e93e41c7bf97b",
"windows-x86_64": "2199eb4c2000ddb1fba85ba78f1fcf9c1fb8b3e57658f6a627a8e513131893f5",
"linux-aarch64": "ab64e3ea277f6fc5f3d723dcd95d9ce1ab282c8ed0f431b4de880d30df891e4f",
"linux-x86_64": "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
"macos-aarch64": "b71e4b7c4b4be9953657877f7f9e6f7ee89114c716da7c070f4a238220e95d7e",
"macos-x86_64": "685816166f21f0b8d6fc7aa6a36e91396dcd82ca6556dfbe3e329deffc01fec3",
"windows-aarch64": "03e984383ebb8f85293557cfa9f48ee8698e7c400239570c9ff1aef3bffaf046",
"windows-x86_64": "f53e5f9011ba20bbc3e0e6d0a9441b31eb227a97bac0e7d24172f1b8b27b4371",
}

# Official recommended version. Should use this when we have a usable release.
Expand Down
12 changes: 6 additions & 6 deletions toolchain/zig-wrapper.zig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const std = @import("std");
const fs = std.fs;
const mem = std.mem;
const process = std.process;
const ChildProcess = std.ChildProcess;
const ChildProcess = std.process.Child;
const ArrayListUnmanaged = std.ArrayListUnmanaged;
const sep = fs.path.sep_str;

Expand Down Expand Up @@ -93,7 +93,7 @@ const ParseResults = union(Action) {
};

// sub-commands in the same folder as `zig-wrapper`
const sub_commands_target = std.ComptimeStringMap(void, .{
const sub_commands_target = std.StaticStringMap(void).initComptime(.{
.{"ar"},
.{"ld.lld"},
.{"lld-link"},
Expand Down Expand Up @@ -142,9 +142,9 @@ fn spawnWindows(arena: mem.Allocator, params: ExecParams) u8 {
proc.env_map = &params.env;
const ret = proc.spawnAndWait() catch |err|
return fatal(
"error spawning {s}: {s}\n",
.{ params.args.items[0], @errorName(err) },
);
"error spawning {s}: {s}\n",
.{ params.args.items[0], @errorName(err) },
);
Comment on lines +145 to +147
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From new version of zig's zig fmt.


switch (ret) {
.Exited => |code| return code,
Expand Down Expand Up @@ -276,7 +276,7 @@ fn getRunMode(self_exe: []const u8, self_base_noexe: []const u8) error{BadParent
// strings `is.it.x86_64?-stallinux,macos-`; we are trying to aid users
// that run things from the wrong directory, not trying to punish the ones
// having fun.
var it = mem.split(u8, triple, "-");
var it = mem.splitSequence(u8, triple, "-");

const arch = it.next() orelse return error.BadParent;
if (mem.indexOf(u8, "aarch64,x86_64,wasm32", arch) == null)
Expand Down