Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 9704f9d

Browse files
committed
update zig sources to 0.16.0-dev.452+1f7ee99b3
1 parent 527953e commit 9704f9d

File tree

335 files changed

+51132
-56847
lines changed

Some content is hidden

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

335 files changed

+51132
-56847
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 21.1.0
1212
* zlib 1.3.1
1313
* zstd 1.5.2
14-
* zig 0.16.0-dev.312+164c598cd
14+
* zig 0.16.0-dev.452+1f7ee99b3
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.16.0-dev.312+164c598cd"
10+
ZIG_VERSION="0.16.0-dev.452+1f7ee99b3"
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.16.0-dev.312+164c598cd"
39+
set ZIG_VERSION="0.16.0-dev.452+1f7ee99b3"
4040
set JOBS_ARG=
4141

4242
pushd %ROOTDIR%

zig/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ set(ZIG_CPP_SOURCES
197197
# These are planned to stay even when we are self-hosted.
198198
src/zig_llvm.cpp
199199
src/zig_llvm-ar.cpp
200-
src/zig_clang.cpp
201200
src/zig_clang_driver.cpp
202201
src/zig_clang_cc1_main.cpp
203202
src/zig_clang_cc1as_main.cpp
@@ -502,7 +501,6 @@ set(ZIG_STAGE2_SOURCES
502501
lib/std/zig/Server.zig
503502
lib/std/zig/WindowsSdk.zig
504503
lib/std/zig/Zir.zig
505-
lib/std/zig/c_builtins.zig
506504
lib/std/zig/string_literal.zig
507505
lib/std/zig/system.zig
508506
lib/std/zig/system/NativePaths.zig
@@ -537,7 +535,6 @@ set(ZIG_STAGE2_SOURCES
537535
src/Value.zig
538536
src/Zcu.zig
539537
src/Zcu/PerThread.zig
540-
src/clang.zig
541538
src/clang_options.zig
542539
src/clang_options_data.zig
543540
src/codegen.zig
@@ -583,6 +580,7 @@ set(ZIG_STAGE2_SOURCES
583580
src/link/Elf/relocatable.zig
584581
src/link/Elf/relocation.zig
585582
src/link/Elf/synthetic_sections.zig
583+
src/link/Elf2.zig
586584
src/link/Goff.zig
587585
src/link/LdScript.zig
588586
src/link/Lld.zig
@@ -612,6 +610,7 @@ set(ZIG_STAGE2_SOURCES
612610
src/link/MachO/synthetic.zig
613611
src/link/MachO/Thunk.zig
614612
src/link/MachO/uuid.zig
613+
src/link/MappedFile.zig
615614
src/link/Queue.zig
616615
src/link/StringTable.zig
617616
src/link/Wasm.zig
@@ -639,7 +638,6 @@ set(ZIG_STAGE2_SOURCES
639638
src/register_manager.zig
640639
src/target.zig
641640
src/tracy.zig
642-
src/translate_c.zig
643641
src/libs/wasi_libc.zig
644642
)
645643

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.16.0-dev.312+164c598cd";
126+
const char *zig_version = "0.16.0-dev.452+1f7ee99b3";
127127

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

zig/build.zig

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ pub fn build(b: *std.Build) !void {
9090
const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false;
9191
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
9292
const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false;
93-
const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false;
94-
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse skip_translate_c;
9593
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
9694
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
9795
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
@@ -202,6 +200,7 @@ pub fn build(b: *std.Build) !void {
202200
});
203201
exe.pie = pie;
204202
exe.entitlements = entitlements;
203+
exe.use_new_linker = b.option(bool, "new-linker", "Use the new linker");
205204

206205
const use_llvm = b.option(bool, "use-llvm", "Use the llvm backend");
207206
exe.use_llvm = use_llvm;
@@ -415,7 +414,7 @@ pub fn build(b: *std.Build) !void {
415414
test_step.dependOn(check_fmt);
416415

417416
const test_cases_step = b.step("test-cases", "Run the main compiler test cases");
418-
try tests.addCases(b, test_cases_step, target, .{
417+
try tests.addCases(b, test_cases_step, .{
419418
.test_filters = test_filters,
420419
.test_target_filters = test_target_filters,
421420
.skip_compile_errors = skip_compile_errors,
@@ -427,9 +426,6 @@ pub fn build(b: *std.Build) !void {
427426
.skip_linux = skip_linux,
428427
.skip_llvm = skip_llvm,
429428
.skip_libc = skip_libc,
430-
}, .{
431-
.skip_translate_c = skip_translate_c,
432-
.skip_run_translated_c = skip_run_translated_c,
433429
}, .{
434430
.enable_llvm = enable_llvm,
435431
.llvm_has_m68k = llvm_has_m68k,
@@ -464,28 +460,6 @@ pub fn build(b: *std.Build) !void {
464460
.max_rss = 4000000000,
465461
}));
466462

467-
if (!skip_translate_c) {
468-
test_modules_step.dependOn(tests.addModuleTests(b, .{
469-
.test_filters = test_filters,
470-
.test_target_filters = test_target_filters,
471-
.test_extra_targets = test_extra_targets,
472-
.root_src = "test/c_import.zig",
473-
.name = "c-import",
474-
.desc = "Run the @cImport tests",
475-
.optimize_modes = optimization_modes,
476-
.include_paths = &.{"test/c_import"},
477-
.skip_single_threaded = true,
478-
.skip_non_native = skip_non_native,
479-
.skip_freebsd = skip_freebsd,
480-
.skip_netbsd = skip_netbsd,
481-
.skip_windows = skip_windows,
482-
.skip_macos = skip_macos,
483-
.skip_linux = skip_linux,
484-
.skip_llvm = skip_llvm,
485-
.skip_libc = skip_libc,
486-
}));
487-
}
488-
489463
test_modules_step.dependOn(tests.addModuleTests(b, .{
490464
.test_filters = test_filters,
491465
.test_target_filters = test_target_filters,
@@ -576,7 +550,6 @@ pub fn build(b: *std.Build) !void {
576550
enable_macos_sdk,
577551
enable_ios_sdk,
578552
enable_symlinks_windows,
579-
skip_translate_c,
580553
));
581554
test_step.dependOn(tests.addCAbiTests(b, .{
582555
.test_target_filters = test_target_filters,
@@ -631,6 +604,12 @@ pub fn build(b: *std.Build) !void {
631604
const test_incremental_step = b.step("test-incremental", "Run the incremental compilation test cases");
632605
try tests.addIncrementalTests(b, test_incremental_step);
633606
test_step.dependOn(test_incremental_step);
607+
608+
if (tests.addLibcTests(b, .{
609+
.optimize_modes = optimization_modes,
610+
.test_filters = test_filters,
611+
.test_target_filters = test_target_filters,
612+
})) |test_libc_step| test_step.dependOn(test_libc_step);
634613
}
635614

636615
fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {
@@ -725,13 +704,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
725704
.root_source_file = b.path("lib/compiler/aro/aro.zig"),
726705
});
727706

728-
const aro_translate_c_mod = b.createModule(.{
729-
.root_source_file = b.path("lib/compiler/aro_translate_c.zig"),
730-
});
731-
732-
aro_translate_c_mod.addImport("aro", aro_mod);
733707
compiler_mod.addImport("aro", aro_mod);
734-
compiler_mod.addImport("aro_translate_c", aro_translate_c_mod);
735708

736709
return compiler_mod;
737710
}
@@ -1151,7 +1124,6 @@ fn toNativePathSep(b: *std.Build, s: []const u8) []u8 {
11511124
const zig_cpp_sources = [_][]const u8{
11521125
// These are planned to stay even when we are self-hosted.
11531126
"src/zig_llvm.cpp",
1154-
"src/zig_clang.cpp",
11551127
"src/zig_llvm-ar.cpp",
11561128
"src/zig_clang_driver.cpp",
11571129
"src/zig_clang_cc1_main.cpp",

zig/doc/langref/test_overaligned_packed_struct.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const S = packed struct {
88
test "overaligned pointer to packed struct" {
99
var foo: S align(4) = .{ .a = 1, .b = 2 };
1010
const ptr: *align(4) S = &foo;
11-
const ptr_to_b: *u32 = &ptr.b;
11+
const ptr_to_b = &ptr.b;
1212
try expect(ptr_to_b.* == 2);
1313
}
1414

zig/lib/compiler/aro/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

zig/lib/compiler/aro/aro.zig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ pub const Driver = @import("aro/Driver.zig");
55
pub const Parser = @import("aro/Parser.zig");
66
pub const Preprocessor = @import("aro/Preprocessor.zig");
77
pub const Source = @import("aro/Source.zig");
8+
pub const StringInterner = @import("aro/StringInterner.zig");
9+
pub const target_util = @import("aro/target.zig");
810
pub const Tokenizer = @import("aro/Tokenizer.zig");
911
pub const Toolchain = @import("aro/Toolchain.zig");
1012
pub const Tree = @import("aro/Tree.zig");
11-
pub const Type = @import("aro/Type.zig");
12-
pub const TypeMapper = @import("aro/StringInterner.zig").TypeMapper;
13-
pub const target_util = @import("aro/target.zig");
13+
pub const TypeStore = @import("aro/TypeStore.zig");
14+
pub const QualType = TypeStore.QualType;
15+
pub const Type = TypeStore.Type;
1416
pub const Value = @import("aro/Value.zig");
1517

1618
const backend = @import("backend.zig");
1719
pub const Interner = backend.Interner;
1820
pub const Ir = backend.Ir;
1921
pub const Object = backend.Object;
2022
pub const CallingConvention = backend.CallingConvention;
23+
pub const Assembly = backend.Assembly;
2124

2225
pub const version_str = backend.version_str;
2326
pub const version = backend.version;
@@ -34,6 +37,5 @@ test {
3437
_ = @import("aro/Preprocessor.zig");
3538
_ = @import("aro/target.zig");
3639
_ = @import("aro/Tokenizer.zig");
37-
_ = @import("aro/toolchains/Linux.zig");
3840
_ = @import("aro/Value.zig");
3941
}

0 commit comments

Comments
 (0)