Skip to content

Commit 91e21f0

Browse files
committed
update zig sources to 0.11.0-dev.78+28288dcbb
1 parent aaf5965 commit 91e21f0

File tree

156 files changed

+2601
-1118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2601
-1118
lines changed

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TARGET="$2" # Example: riscv64-linux-gnu
77
MCPU="$3" # Examples: `baseline`, `native`, `generic+v7a`, or `arm1176jzf_s`
88

99
ROOTDIR="$(pwd)"
10-
ZIG_VERSION="0.10.0"
10+
ZIG_VERSION="0.11.0-dev.78+28288dcbb"
1111

1212
TARGET_OS_AND_ABI=${TARGET#*-} # Example: linux-gnu
1313

zig/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ project(zig C CXX)
4141
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
4242

4343
set(ZIG_VERSION_MAJOR 0)
44-
set(ZIG_VERSION_MINOR 10)
44+
set(ZIG_VERSION_MINOR 11)
4545
set(ZIG_VERSION_PATCH 0)
4646
set(ZIG_VERSION "" CACHE STRING "Override Zig version string. Default is to find out with git.")
4747

zig/build.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const fs = std.fs;
1010
const InstallDirectoryOptions = std.build.InstallDirectoryOptions;
1111
const assert = std.debug.assert;
1212

13-
const zig_version = std.builtin.Version{ .major = 0, .minor = 10, .patch = 0 };
13+
const zig_version = std.builtin.Version{ .major = 0, .minor = 11, .patch = 0 };
1414
const stack_size = 32 * 1024 * 1024;
1515

1616
pub fn build(b: *Builder) !void {
1717
b.setPreferredReleaseMode(.ReleaseFast);
1818
const test_step = b.step("test", "Run all the tests");
1919
const mode = b.standardReleaseOptions();
20-
const target = b.standardTargetOptions(.{});
20+
var target = b.standardTargetOptions(.{});
2121
const single_threaded = b.option(bool, "single-threaded", "Build artifacts that run in single threaded mode");
2222
const use_zig_libcxx = b.option(bool, "use-zig-libcxx", "If libc++ is needed, use zig's bundled version, don't try to integrate with the system") orelse false;
2323

@@ -141,6 +141,10 @@ pub fn build(b: *Builder) !void {
141141
break :blk 4;
142142
};
143143

144+
if (only_c) {
145+
target.ofmt = .c;
146+
}
147+
144148
const main_file: ?[]const u8 = mf: {
145149
if (!have_stage1) break :mf "src/main.zig";
146150
if (use_zig0) break :mf null;
@@ -172,10 +176,6 @@ pub fn build(b: *Builder) !void {
172176
test_cases.want_lto = false;
173177
}
174178

175-
if (only_c) {
176-
exe.ofmt = .c;
177-
}
178-
179179
const exe_options = b.addOptions();
180180
exe.addOptions("build_options", exe_options);
181181

zig/doc/langref.html.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5126,7 +5126,7 @@ const builtin = @import("builtin");
51265126
const native_arch = builtin.cpu.arch;
51275127
const expect = std.testing.expect;
51285128

5129-
const WINAPI: std.builtin.CallingConvention = if (native_arch == .i386) .Stdcall else .C;
5129+
const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C;
51305130
extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(WINAPI) noreturn;
51315131

51325132
test "foo" {
@@ -5165,7 +5165,7 @@ export fn sub(a: i8, b: i8) i8 { return a - b; }
51655165
// at link time, when linking statically, or at runtime, when linking
51665166
// dynamically.
51675167
// The callconv specifier changes the calling convention of the function.
5168-
const WINAPI: std.builtin.CallingConvention = if (native_arch == .i386) .Stdcall else .C;
5168+
const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C;
51695169
extern "kernel32" fn ExitProcess(exit_code: u32) callconv(WINAPI) noreturn;
51705170
extern "c" fn atan2(a: f64, b: f64) f64;
51715171

@@ -7487,7 +7487,7 @@ volatile (
74877487
: "rcx", "r11"
74887488
);{#end_syntax_block#}
74897489
<p>
7490-
For i386 and x86_64 targets, the syntax is AT&amp;T syntax, rather than the more
7490+
For x86 and x86_64 targets, the syntax is AT&amp;T syntax, rather than the more
74917491
popular Intel syntax. This is due to technical constraints; assembly parsing is
74927492
provided by LLVM and its support for Intel syntax is buggy and not well tested.
74937493
</p>
@@ -11608,7 +11608,7 @@ Architectures:
1160811608
v5
1160911609
v5te
1161011610
v4t
11611-
i386
11611+
x86
1161211612
x86_64 (native)
1161311613
xcore
1161411614
nvptx
@@ -11687,8 +11687,8 @@ Available libcs:
1168711687
arm-linux-gnueabihf
1168811688
arm-linux-musleabi
1168911689
arm-linux-musleabihf
11690-
i386-linux-gnu
11691-
i386-linux-musl
11690+
x86-linux-gnu
11691+
x86-linux-musl
1169211692
mips64el-linux-gnuabi64
1169311693
mips64el-linux-gnuabin32
1169411694
mips64el-linux-musl

zig/lib/c.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ test "strncmp" {
190190
// across .o file boundaries. fix comptime @ptrCast of nakedcc functions.
191191
fn clone() callconv(.Naked) void {
192192
switch (native_arch) {
193-
.i386 => {
193+
.x86 => {
194194
// __clone(func, stack, flags, arg, ptid, tls, ctid)
195195
// +8, +12, +16, +20, +24, +28, +32
196196
// syscall(SYS_clone, flags, stack, ptid, tls, ctid)

zig/lib/compiler_rt/aulldiv.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const common = @import("common.zig");
77
pub const panic = common.panic;
88

99
comptime {
10-
if (arch == .i386 and abi == .msvc) {
10+
if (arch == .x86 and abi == .msvc) {
1111
// Don't let LLVM apply the stdcall name mangling on those MSVC builtins
1212
@export(_alldiv, .{ .name = "\x01__alldiv", .linkage = common.linkage });
1313
@export(_aulldiv, .{ .name = "\x01__aulldiv", .linkage = common.linkage });

zig/lib/compiler_rt/aullrem.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const common = @import("common.zig");
77
pub const panic = common.panic;
88

99
comptime {
10-
if (arch == .i386 and abi == .msvc) {
10+
if (arch == .x86 and abi == .msvc) {
1111
// Don't let LLVM apply the stdcall name mangling on those MSVC builtins
1212
@export(_allrem, .{ .name = "\x01__allrem", .linkage = common.linkage });
1313
@export(_aullrem, .{ .name = "\x01__aullrem", .linkage = common.linkage });

zig/lib/compiler_rt/clear_cache.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ comptime {
1717

1818
fn clear_cache(start: usize, end: usize) callconv(.C) void {
1919
const x86 = switch (arch) {
20-
.i386, .x86_64 => true,
20+
.x86, .x86_64 => true,
2121
else => false,
2222
};
2323
const arm32 = switch (arch) {

zig/lib/compiler_rt/common.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub const gnu_f16_abi = switch (builtin.cpu.arch) {
4848
.x86_64,
4949
=> false,
5050

51-
.i386 => true,
51+
.x86 => true,
5252

5353
.arm, .armeb, .thumb, .thumbeb => switch (builtin.abi) {
5454
.eabi, .eabihf => false,
@@ -79,7 +79,7 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
7979
pub const F16T = switch (builtin.cpu.arch) {
8080
.aarch64, .aarch64_be, .aarch64_32 => f16,
8181
.riscv64 => if (builtin.zig_backend == .stage1) u16 else f16,
82-
.i386, .x86_64 => f16,
82+
.x86, .x86_64 => f16,
8383
else => u16,
8484
};
8585

zig/lib/compiler_rt/divti3.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub const panic = common.panic;
99
comptime {
1010
if (builtin.os.tag == .windows) {
1111
switch (arch) {
12-
.i386 => {
12+
.x86 => {
1313
@export(__divti3, .{ .name = "__divti3", .linkage = common.linkage });
1414
},
1515
.x86_64 => {

zig/lib/compiler_rt/extendf_test.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ test "extendhfsf2" {
140140
try test__extendhfsf2(0x7f00, 0x7fe00000); // sNaN
141141
// On x86 the NaN becomes quiet because the return is pushed on the x87
142142
// stack due to ABI requirements
143-
if (builtin.target.cpu.arch != .i386 and builtin.target.os.tag == .windows)
143+
if (builtin.target.cpu.arch != .x86 and builtin.target.os.tag == .windows)
144144
try test__extendhfsf2(0x7c01, 0x7f802000); // sNaN
145145

146146
try test__extendhfsf2(0, 0); // 0

zig/lib/compiler_rt/stack_probe.zig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ comptime {
1818
if (is_mingw) {
1919
@export(_chkstk, .{ .name = "_alloca", .linkage = strong_linkage });
2020
@export(___chkstk_ms, .{ .name = "___chkstk_ms", .linkage = strong_linkage });
21+
22+
if (arch.isAARCH64()) {
23+
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
24+
}
2125
} else if (!builtin.link_libc) {
2226
// This symbols are otherwise exported by MSVCRT.lib
2327
@export(_chkstk, .{ .name = "_chkstk", .linkage = strong_linkage });
2428
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
2529
}
26-
27-
if (arch.isAARCH64()) {
28-
@export(__chkstk, .{ .name = "__chkstk", .linkage = strong_linkage });
29-
}
3030
}
3131

3232
switch (arch) {
33-
.i386,
33+
.x86,
3434
.x86_64,
3535
=> {
3636
@export(zig_probe_stack, .{ .name = "__zig_probe_stack", .linkage = linkage });
@@ -69,7 +69,7 @@ pub fn zig_probe_stack() callconv(.Naked) void {
6969
\\ ret
7070
);
7171
},
72-
.i386 => {
72+
.x86 => {
7373
// %eax = probe length, %esp = stack pointer
7474
asm volatile (
7575
\\ push %%ecx
@@ -121,7 +121,7 @@ fn win_probe_stack_only() void {
121121
\\ ret
122122
);
123123
},
124-
.i386 => {
124+
.x86 => {
125125
asm volatile (
126126
\\ push %%ecx
127127
\\ push %%eax
@@ -191,7 +191,7 @@ fn win_probe_stack_adjust_sp() void {
191191
\\ ret
192192
);
193193
},
194-
.i386 => {
194+
.x86 => {
195195
asm volatile (
196196
\\ push %%ecx
197197
\\ cmp $0x1000,%%eax
@@ -243,7 +243,7 @@ pub fn __chkstk() callconv(.Naked) void {
243243
if (comptime arch.isAARCH64()) {
244244
@call(.{ .modifier = .always_inline }, win_probe_stack_only, .{});
245245
} else switch (arch) {
246-
.i386 => @call(.{ .modifier = .always_inline }, win_probe_stack_adjust_sp, .{}),
246+
.x86 => @call(.{ .modifier = .always_inline }, win_probe_stack_adjust_sp, .{}),
247247
.x86_64 => @call(.{ .modifier = .always_inline }, win_probe_stack_only, .{}),
248248
else => unreachable,
249249
}

0 commit comments

Comments
 (0)