Skip to content

Commit e9149cc

Browse files
committed
update zig sources to 0.15.0-dev.769+4d7980645
1 parent 25a76f8 commit e9149cc

File tree

1,077 files changed

+2624
-50897
lines changed

Some content is hidden

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

1,077 files changed

+2624
-50897
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ to find and inspect the patch diffs.
1111
* LLVM, LLD, Clang 20.1.2
1212
* zlib 1.3.1
1313
* zstd 1.5.2
14-
* zig 0.15.0-dev.718+826e1c30b
14+
* zig 0.15.0-dev.769+4d7980645
1515

1616
For other versions, check the git tags of this repository.
1717

build

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

99
ROOTDIR="$(pwd)"
10-
ZIG_VERSION="0.15.0-dev.718+826e1c30b"
10+
ZIG_VERSION="0.15.0-dev.769+4d7980645"
1111

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

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if "%VSCMD_ARG_HOST_ARCH%"=="x86" set OUTDIR=out-win-x86
3636

3737
set ROOTDIR=%~dp0
3838
set "ROOTDIR_CMAKE=%ROOTDIR:\=/%"
39-
set ZIG_VERSION="0.15.0-dev.718+826e1c30b"
39+
set ZIG_VERSION="0.15.0-dev.769+4d7980645"
4040
set JOBS_ARG=
4141

4242
pushd %ROOTDIR%

zig/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ set(ZIG_STAGE2_SOURCES
519519
src/Air/Legalize.zig
520520
src/Air/Liveness.zig
521521
src/Air/Liveness/Verify.zig
522+
src/Air/print.zig
522523
src/Air/types_resolved.zig
523524
src/Builtin.zig
524525
src/Compilation.zig
@@ -675,7 +676,6 @@ set(ZIG_STAGE2_SOURCES
675676
src/libs/mingw.zig
676677
src/libs/musl.zig
677678
src/mutable_value.zig
678-
src/print_air.zig
679679
src/print_env.zig
680680
src/print_targets.zig
681681
src/print_value.zig
@@ -797,13 +797,12 @@ elseif(ZIG_HOST_TARGET_ARCH STREQUAL "amd64")
797797
set(ZIG_HOST_TARGET_ARCH "x86_64")
798798
elseif(ZIG_HOST_TARGET_ARCH STREQUAL "arm64")
799799
set(ZIG_HOST_TARGET_ARCH "aarch64")
800-
elseif(ZIG_HOST_TARGET_ARCH STREQUAL "armv7l")
800+
elseif(ZIG_HOST_TARGET_ARCH MATCHES "^arm(el)?$" OR ZIG_HOST_TARGET_ARCH MATCHES "^armv[7-8]l$")
801801
set(ZIG_HOST_TARGET_ARCH "arm")
802-
elseif(ZIG_HOST_TARGET_ARCH STREQUAL "armv7b")
802+
elseif(ZIG_HOST_TARGET_ARCH STREQUAL "armeb" OR ZIG_HOST_TARGET_ARCH MATCHES "^armv[7-8]b$")
803803
set(ZIG_HOST_TARGET_ARCH "armeb")
804804
endif()
805-
string(REGEX REPLACE "^((arm|thumb)(hf?)?)el$" "\\1" ZIG_HOST_TARGET_ARCH "${ZIG_HOST_TARGET_ARCH}")
806-
if(ZIG_HOST_TARGET_ARCH MATCHES "^arm(hf?)?(eb)?$")
805+
if(ZIG_HOST_TARGET_ARCH MATCHES "^arm(eb)?$")
807806
check_symbol_exists(__thumb__ "" ZIG_HOST_TARGET_DEFAULTS_TO_THUMB)
808807
if(ZIG_HOST_TARGET_DEFAULTS_TO_THUMB)
809808
string(REGEX REPLACE "^arm" "thumb" ZIG_HOST_TARGET_ARCH "${ZIG_HOST_TARGET_ARCH}")

zig/bootstrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int main(int argc, char **argv) {
123123
if (f == NULL)
124124
panic("unable to open config.zig for writing");
125125

126-
const char *zig_version = "0.15.0-dev.718+826e1c30b";
126+
const char *zig_version = "0.15.0-dev.769+4d7980645";
127127

128128
int written = fprintf(f,
129129
"pub const have_llvm = false;\n"

zig/build.zig

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ pub fn build(b: *std.Build) !void {
9292
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
9393
const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false;
9494
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false;
95+
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
96+
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
97+
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
98+
const skip_macos = b.option(bool, "skip-macos", "Main test suite skips targets with macos OS") orelse false;
99+
const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;
100+
const skip_llvm = b.option(bool, "skip-llvm", "Main test suite skips targets that use LLVM backend") orelse false;
95101

96102
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
97103

@@ -435,10 +441,15 @@ pub fn build(b: *std.Build) !void {
435441
.include_paths = &.{},
436442
.skip_single_threaded = skip_single_threaded,
437443
.skip_non_native = skip_non_native,
444+
.skip_freebsd = skip_freebsd,
445+
.skip_netbsd = skip_netbsd,
446+
.skip_windows = skip_windows,
447+
.skip_macos = skip_macos,
448+
.skip_linux = skip_linux,
449+
.skip_llvm = skip_llvm,
438450
.skip_libc = skip_libc,
439-
.use_llvm = use_llvm,
440-
// 2520100864 was observed on an x86_64-linux-gnu host.
441-
.max_rss = 2772110950,
451+
// 2923515904 was observed on an x86_64-linux-gnu host.
452+
.max_rss = 3100000000,
442453
}));
443454

444455
test_modules_step.dependOn(tests.addModuleTests(b, .{
@@ -452,8 +463,13 @@ pub fn build(b: *std.Build) !void {
452463
.include_paths = &.{"test/c_import"},
453464
.skip_single_threaded = true,
454465
.skip_non_native = skip_non_native,
466+
.skip_freebsd = skip_freebsd,
467+
.skip_netbsd = skip_netbsd,
468+
.skip_windows = skip_windows,
469+
.skip_macos = skip_macos,
470+
.skip_linux = skip_linux,
471+
.skip_llvm = skip_llvm,
455472
.skip_libc = skip_libc,
456-
.use_llvm = use_llvm,
457473
}));
458474

459475
test_modules_step.dependOn(tests.addModuleTests(b, .{
@@ -467,8 +483,13 @@ pub fn build(b: *std.Build) !void {
467483
.include_paths = &.{},
468484
.skip_single_threaded = true,
469485
.skip_non_native = skip_non_native,
486+
.skip_freebsd = skip_freebsd,
487+
.skip_netbsd = skip_netbsd,
488+
.skip_windows = skip_windows,
489+
.skip_macos = skip_macos,
490+
.skip_linux = skip_linux,
491+
.skip_llvm = skip_llvm,
470492
.skip_libc = true,
471-
.use_llvm = use_llvm,
472493
.no_builtin = true,
473494
}));
474495

@@ -483,8 +504,13 @@ pub fn build(b: *std.Build) !void {
483504
.include_paths = &.{},
484505
.skip_single_threaded = true,
485506
.skip_non_native = skip_non_native,
507+
.skip_freebsd = skip_freebsd,
508+
.skip_netbsd = skip_netbsd,
509+
.skip_windows = skip_windows,
510+
.skip_macos = skip_macos,
511+
.skip_linux = skip_linux,
512+
.skip_llvm = skip_llvm,
486513
.skip_libc = true,
487-
.use_llvm = use_llvm,
488514
.no_builtin = true,
489515
}));
490516

@@ -499,8 +525,13 @@ pub fn build(b: *std.Build) !void {
499525
.include_paths = &.{},
500526
.skip_single_threaded = skip_single_threaded,
501527
.skip_non_native = skip_non_native,
528+
.skip_freebsd = skip_freebsd,
529+
.skip_netbsd = skip_netbsd,
530+
.skip_windows = skip_windows,
531+
.skip_macos = skip_macos,
532+
.skip_linux = skip_linux,
533+
.skip_llvm = skip_llvm,
502534
.skip_libc = skip_libc,
503-
.use_llvm = use_llvm,
504535
// I observed a value of 5605064704 on the M2 CI.
505536
.max_rss = 6165571174,
506537
}));
@@ -536,6 +567,12 @@ pub fn build(b: *std.Build) !void {
536567
test_step.dependOn(tests.addCAbiTests(b, .{
537568
.test_target_filters = test_target_filters,
538569
.skip_non_native = skip_non_native,
570+
.skip_freebsd = skip_freebsd,
571+
.skip_netbsd = skip_netbsd,
572+
.skip_windows = skip_windows,
573+
.skip_macos = skip_macos,
574+
.skip_linux = skip_linux,
575+
.skip_llvm = skip_llvm,
539576
.skip_release = skip_release,
540577
}));
541578
test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, enable_ios_sdk, enable_symlinks_windows));
@@ -549,7 +586,6 @@ pub fn build(b: *std.Build) !void {
549586
.lldb = b.option([]const u8, "lldb", "path to lldb binary"),
550587
.optimize_modes = optimization_modes,
551588
.skip_single_threaded = skip_single_threaded,
552-
.skip_non_native = skip_non_native,
553589
.skip_libc = skip_libc,
554590
})) |test_debugger_step| test_step.dependOn(test_debugger_step);
555591
if (tests.addLlvmIrTests(b, .{

zig/doc/langref.html.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@
777777
value. Using this value would be a bug. The value will be unused, or overwritten before being used."
778778
</p>
779779
<p>
780-
In {#link|Debug#} mode, Zig writes {#syntax#}0xaa{#endsyntax#} bytes to undefined memory. This is to catch
780+
In {#link|Debug#} and {#link|ReleaseSafe#} mode, Zig writes {#syntax#}0xaa{#endsyntax#} bytes to undefined memory. This is to catch
781781
bugs early, and to help detect use of undefined memory in a debugger. However, this behavior is only an
782782
implementation feature, not a language semantic, so it is not guaranteed to be observable to code.
783783
</p>
@@ -2295,7 +2295,7 @@ or
22952295
{#code|test_aligned_struct_fields.zig#}
22962296

22972297
<p>
2298-
Equating packed structs results in a comparison of the backing integer,
2298+
Equating packed structs results in a comparison of the backing integer,
22992299
and only works for the {#syntax#}=={#endsyntax#} and {#syntax#}!={#endsyntax#} {#link|Operators#}.
23002300
</p>
23012301
{#code|test_packed_struct_equality.zig#}

zig/doc/langref/test_global_assembly.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ test "global assembly" {
1919

2020
// test
2121
// target=x86_64-linux
22+
// llvm=true

zig/lib/compiler/aro/aro/target.zig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub fn ignoreNonZeroSizedBitfieldTypeAlignment(target: std.Target) bool {
162162
switch (target.cpu.arch) {
163163
.avr => return true,
164164
.arm => {
165-
if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
165+
if (target.cpu.has(.arm, .has_v7)) {
166166
switch (target.os.tag) {
167167
.ios => return true,
168168
else => return false,
@@ -185,7 +185,7 @@ pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 {
185185
switch (target.cpu.arch) {
186186
.avr => return 8,
187187
.arm => {
188-
if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
188+
if (target.cpu.has(.arm, .has_v7)) {
189189
switch (target.os.tag) {
190190
.ios => return 32,
191191
else => return null,
@@ -203,7 +203,7 @@ pub fn unnamedFieldAffectsAlignment(target: std.Target) bool {
203203
return true;
204204
},
205205
.armeb => {
206-
if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
206+
if (target.cpu.has(.arm, .has_v7)) {
207207
if (std.Target.Abi.default(target.cpu.arch, target.os.tag) == .eabi) return true;
208208
}
209209
},
@@ -230,7 +230,7 @@ pub fn defaultAlignment(target: std.Target) u29 {
230230
switch (target.cpu.arch) {
231231
.avr => return 1,
232232
.arm => if (target.abi.isAndroid() or target.os.tag == .ios) return 16 else return 8,
233-
.sparc => if (std.Target.sparc.featureSetHas(target.cpu.features, .v9)) return 16 else return 8,
233+
.sparc => if (target.cpu.has(.sparc, .v9)) return 16 else return 8,
234234
.mips, .mipsel => switch (target.abi) {
235235
.none, .gnuabi64 => return 16,
236236
else => return 8,
@@ -268,7 +268,7 @@ pub fn systemCompiler(target: std.Target) LangOpts.Compiler {
268268
pub fn hasFloat128(target: std.Target) bool {
269269
if (target.cpu.arch.isWasm()) return true;
270270
if (target.os.tag.isDarwin()) return false;
271-
if (target.cpu.arch.isPowerPC()) return std.Target.powerpc.featureSetHas(target.cpu.features, .float128);
271+
if (target.cpu.arch.isPowerPC()) return target.cpu.has(.powerpc, .float128);
272272
return switch (target.os.tag) {
273273
.dragonfly,
274274
.haiku,
@@ -334,7 +334,7 @@ pub const FPSemantics = enum {
334334
.spirv32,
335335
.spirv64,
336336
=> return .IEEEHalf,
337-
.x86, .x86_64 => if (std.Target.x86.featureSetHas(target.cpu.features, .sse2)) return .IEEEHalf,
337+
.x86, .x86_64 => if (target.cpu.has(.x86, .sse2)) return .IEEEHalf,
338338
else => {},
339339
}
340340
return null;
@@ -399,7 +399,7 @@ pub fn defaultFpEvalMethod(target: std.Target) LangOpts.FPEvalMethod {
399399
return .double;
400400
}
401401
}
402-
if (std.Target.x86.featureSetHas(target.cpu.features, .sse)) {
402+
if (target.cpu.has(.x86, .sse)) {
403403
return .source;
404404
}
405405
return .extended;
@@ -765,7 +765,7 @@ test "target size/align tests" {
765765
.specifier = .char,
766766
};
767767

768-
try std.testing.expectEqual(true, std.Target.arm.featureSetHas(comp.target.cpu.features, .has_v7));
768+
try std.testing.expectEqual(true, comp.target.cpu.has(.arm, .has_v7));
769769
try std.testing.expectEqual(@as(u64, 1), ct.sizeof(&comp).?);
770770
try std.testing.expectEqual(@as(u64, 1), ct.alignof(&comp));
771771
try std.testing.expectEqual(true, ignoreNonZeroSizedBitfieldTypeAlignment(comp.target));

zig/lib/compiler/aro/aro/toolchains/Linux.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.Arra
318318

319319
fn getMultiarchTriple(target: std.Target) ?[]const u8 {
320320
const is_android = target.abi.isAndroid();
321-
const is_mips_r6 = std.Target.mips.featureSetHas(target.cpu.features, .mips32r6);
321+
const is_mips_r6 = target.cpu.has(.mips, .mips32r6);
322322
return switch (target.cpu.arch) {
323323
.arm, .thumb => if (is_android) "arm-linux-androideabi" else if (target.abi == .gnueabihf) "arm-linux-gnueabihf" else "arm-linux-gnueabi",
324324
.armeb, .thumbeb => if (target.abi == .gnueabihf) "armeb-linux-gnueabihf" else "armeb-linux-gnueabi",

0 commit comments

Comments
 (0)