Skip to content

Commit 66c0f7a

Browse files
authored
Merge pull request #197 from alexrp/master
Update to Zig 0.14.0-dev.1876+41dbd0d0d and update target triple list
2 parents cafebd7 + bc7b15c commit 66c0f7a

File tree

381 files changed

+13451
-6737
lines changed

Some content is hidden

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

381 files changed

+13451
-6737
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ to find and inspect the patch diffs.
1111
* LLVM, LLD, Clang 19.1.0
1212
* zlib 1.3.1
1313
* zstd 1.5.2
14-
* zig 0.14.0-dev.1622+2ac543388
14+
* zig 0.14.0-dev.1876+41dbd0d0d
1515

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

@@ -102,16 +102,17 @@ is more portable across Linux distributions.
102102
| `aarch64_be-linux-musl` | OK |
103103
| `arm-linux-gnueabi` | [#101](https://github.com/ziglang/zig-bootstrap/issues/101) |
104104
| `arm-linux-gnueabihf` | [#102](https://github.com/ziglang/zig-bootstrap/issues/102) |
105-
| `arm-linux-musleabi` | [#103](https://github.com/ziglang/zig-bootstrap/issues/103) |
106-
| `arm-linux-musleabihf` | [#183](https://github.com/ziglang/zig-bootstrap/issues/183) |
105+
| `arm-linux-musleabi` | OK |
106+
| `arm-linux-musleabihf` | OK |
107107
| `armeb-linux-gnueabi` | [#96](https://github.com/ziglang/zig-bootstrap/issues/96) |
108108
| `armeb-linux-gnueabihf` | [#97](https://github.com/ziglang/zig-bootstrap/issues/97) |
109-
| `armeb-linux-musleabi` | [#98](https://github.com/ziglang/zig-bootstrap/issues/98) |
110-
| `armeb-linux-musleabihf` | [#99](https://github.com/ziglang/zig-bootstrap/issues/99) |
109+
| `armeb-linux-musleabi` | OK |
110+
| `armeb-linux-musleabihf` | OK |
111111
| `loongarch64-linux-gnu` | OK |
112+
| `loongarch64-linux-gnusf` | OK |
112113
| `loongarch64-linux-musl` | OK |
113-
| `mips-linux-gnueabi` | OK |
114-
| `mips-linux-gnueabihf` | OK |
114+
| `mips-linux-gnueabi` | [#195](https://github.com/ziglang/zig-bootstrap/issues/195) |
115+
| `mips-linux-gnueabihf` | [#196](https://github.com/ziglang/zig-bootstrap/issues/196) |
115116
| `mips-linux-musleabi` | OK |
116117
| `mips-linux-musleabihf` | OK |
117118
| `mips64-linux-gnuabi64` | OK |
@@ -136,15 +137,15 @@ is more portable across Linux distributions.
136137
| `riscv32-linux-musl` | OK |
137138
| `riscv64-linux-gnu` | OK |
138139
| `riscv64-linux-musl` | OK |
139-
| `s390x-linux-gnu` | [#116](https://github.com/ziglang/zig-bootstrap/issues/116) |
140-
| `s390x-linux-musl` | [#52](https://github.com/ziglang/bootstrap/issues/52) |
140+
| `s390x-linux-gnu` | OK |
141+
| `s390x-linux-musl` | OK |
141142
| `sparc-linux-gnu` | [#117](https://github.com/ziglang/zig-bootstrap/issues/117) |
142143
| `sparc64-linux-gnu` | [#172](https://github.com/ziglang/zig-bootstrap/issues/172) |
143-
| `thumb-linux-musleabi` | [#176](https://github.com/ziglang/zig-bootstrap/issues/176) |
144-
| `thumb-linux-musleabihf` | [#175](https://github.com/ziglang/zig-bootstrap/issues/175) |
145-
| `thumb-windows-gnu` | [#105](https://github.com/ziglang/zig-bootstrap/issues/105) |
146-
| `thumbeb-linux-musleabi` | [#180](https://github.com/ziglang/zig-bootstrap/issues/180) |
147-
| `thumbeb-linux-musleabihf` | [#179](https://github.com/ziglang/zig-bootstrap/issues/179) |
144+
| `thumb-linux-musleabi` | OK |
145+
| `thumb-linux-musleabihf` | OK |
146+
| `thumb-windows-gnu` | OK |
147+
| `thumbeb-linux-musleabi` | OK |
148+
| `thumbeb-linux-musleabihf` | OK |
148149
| `x86-linux-gnu` | OK |
149150
| `x86-linux-musl` | OK |
150151
| `x86-windows-gnu` | OK |

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.14.0-dev.1622+2ac543388"
10+
ZIG_VERSION="0.14.0-dev.1876+41dbd0d0d"
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
@@ -35,7 +35,7 @@ if "%VSCMD_ARG_HOST_ARCH%"=="x86" set OUTDIR=out-win-x86
3535

3636
set ROOTDIR=%~dp0
3737
set "ROOTDIR_CMAKE=%ROOTDIR:\=/%"
38-
set ZIG_VERSION="0.14.0-dev.1622+2ac543388"
38+
set ZIG_VERSION="0.14.0-dev.1876+41dbd0d0d"
3939
set JOBS_ARG=
4040

4141
pushd %ROOTDIR%

zig/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ check_pie_supported(
125125
OUTPUT_VARIABLE ZIG_PIE_SUPPORTED_BY_CMAKE
126126
LANGUAGES C CXX
127127
)
128-
if(ZIG_PIE AND NOT ZIG_PIE_SUPPORTED_BY_CMAKE)
129-
message(SEND_ERROR "ZIG_PIE was requested but CMake does not support it for \"zigcpp\" target")
128+
if(ZIG_PIE AND NOT CMAKE_CXX_LINK_PIE_SUPPORTED)
129+
message(SEND_ERROR "ZIG_PIE was requested but CMake does not support it for \"zigcpp\" target: ${ZIG_PIE_SUPPORTED_BY_CMAKE}")
130130
endif()
131131

132132

@@ -894,9 +894,7 @@ set(BUILD_COMPILER_RT_ARGS
894894
--name compiler_rt
895895
-femit-bin="${ZIG_COMPILER_RT_C_SOURCE}"
896896
-target "${ZIG_HOST_TARGET_TRIPLE}"
897-
--dep "build_options"
898897
"-Mroot=lib/compiler_rt.zig"
899-
"-Mbuild_options=${ZIG_CONFIG_ZIG_OUT}"
900898
)
901899

902900
add_custom_command(

zig/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Ensure you have the required dependencies:
4747

4848
* CMake >= 3.15
4949
* System C/C++ Toolchain
50-
* LLVM, Clang, LLD development libraries == 18.x
50+
* LLVM, Clang, LLD development libraries == 19.x
5151

5252
Then it is the standard CMake build process:
5353

zig/bootstrap.c

Lines changed: 1 addition & 3 deletions
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.14.0-dev.1622+2ac543388";
126+
const char *zig_version = "0.14.0-dev.1876+41dbd0d0d";
127127

128128
int written = fprintf(f,
129129
"pub const have_llvm = false;\n"
@@ -170,9 +170,7 @@ int main(int argc, char **argv) {
170170
"-ofmt=c", "-OReleaseSmall",
171171
"--name", "compiler_rt", "-femit-bin=compiler_rt.c",
172172
"-target", host_triple,
173-
"--dep", "build_options",
174173
"-Mroot=lib/compiler_rt.zig",
175-
"-Mbuild_options=config.zig",
176174
NULL,
177175
};
178176
print_and_run(child_argv);

zig/build.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,10 @@ pub fn build(b: *std.Build) !void {
577577
} else {
578578
update_mingw_step.dependOn(&b.addFail("The -Dmingw-src=... option is required for this step").step);
579579
}
580+
581+
const test_incremental_step = b.step("test-incremental", "Run the incremental compilation test cases");
582+
try tests.addIncrementalTests(b, test_incremental_step);
583+
test_step.dependOn(test_incremental_step);
580584
}
581585

582586
fn addWasiUpdateStep(b: *std.Build, version: [:0]const u8) !void {

zig/doc/langref.html.in

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,11 +4218,10 @@ pub fn print(self: *Writer, arg0: []const u8, arg1: i32) !void {
42184218
{#header_close#}
42194219

42204220
{#header_open|Atomics#}
4221-
<p>TODO: @fence()</p>
42224221
<p>TODO: @atomic rmw</p>
42234222
<p>TODO: builtin atomic memory ordering enum</p>
42244223

4225-
{#see_also|@atomicLoad|@atomicStore|@atomicRmw|@fence|@cmpxchgWeak|@cmpxchgStrong#}
4224+
{#see_also|@atomicLoad|@atomicStore|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
42264225

42274226
{#header_close#}
42284227

@@ -4307,7 +4306,7 @@ comptime {
43074306
an integer or an enum.
43084307
</p>
43094308
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4310-
{#see_also|@atomicStore|@atomicRmw|@fence|@cmpxchgWeak|@cmpxchgStrong#}
4309+
{#see_also|@atomicStore|@atomicRmw||@cmpxchgWeak|@cmpxchgStrong#}
43114310
{#header_close#}
43124311

43134312
{#header_open|@atomicRmw#}
@@ -4322,7 +4321,7 @@ comptime {
43224321
</p>
43234322
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
43244323
<p>{#syntax#}AtomicRmwOp{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicRmwOp{#endsyntax#}.</p>
4325-
{#see_also|@atomicStore|@atomicLoad|@fence|@cmpxchgWeak|@cmpxchgStrong#}
4324+
{#see_also|@atomicStore|@atomicLoad|@cmpxchgWeak|@cmpxchgStrong#}
43264325
{#header_close#}
43274326

43284327
{#header_open|@atomicStore#}
@@ -4335,7 +4334,7 @@ comptime {
43354334
an integer or an enum.
43364335
</p>
43374336
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4338-
{#see_also|@atomicLoad|@atomicRmw|@fence|@cmpxchgWeak|@cmpxchgStrong#}
4337+
{#see_also|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
43394338
{#header_close#}
43404339

43414340
{#header_open|@bitCast#}
@@ -4568,7 +4567,7 @@ comptime {
45684567
</p>
45694568
<p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
45704569
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4571-
{#see_also|@atomicStore|@atomicLoad|@atomicRmw|@fence|@cmpxchgWeak#}
4570+
{#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak#}
45724571
{#header_close#}
45734572

45744573
{#header_open|@cmpxchgWeak#}
@@ -4600,7 +4599,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
46004599
</p>
46014600
<p>{#syntax#}@typeInfo(@TypeOf(ptr)).pointer.alignment{#endsyntax#} must be {#syntax#}>= @sizeOf(T).{#endsyntax#}</p>
46024601
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4603-
{#see_also|@atomicStore|@atomicLoad|@atomicRmw|@fence|@cmpxchgStrong#}
4602+
{#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgStrong#}
46044603
{#header_close#}
46054604

46064605
{#header_open|@compileError#}
@@ -4766,10 +4765,10 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
47664765
Converts an integer into an {#link|enum#} value. The return type is the inferred result type.
47674766
</p>
47684767
<p>
4769-
Attempting to convert an integer with no corresponding value in the enum invokes
4768+
Attempting to convert an integer with no corresponding value in the enum invokes
47704769
safety-checked {#link|Undefined Behavior#}.
47714770
Note that a {#link|non-exhaustive enum|Non-exhaustive enum#} has corresponding values for all
4772-
integers in the enum's integer tag type: the {#syntax#}_{#endsyntax#} value represents all
4771+
integers in the enum's integer tag type: the {#syntax#}_{#endsyntax#} value represents all
47734772
the remaining unnamed integers in the enum's tag type.
47744773
</p>
47754774
{#see_also|@intFromEnum#}
@@ -4857,15 +4856,6 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
48574856
{#see_also|@export#}
48584857
{#header_close#}
48594858

4860-
{#header_open|@fence#}
4861-
<pre>{#syntax#}@fence(order: AtomicOrder) void{#endsyntax#}</pre>
4862-
<p>
4863-
The {#syntax#}fence{#endsyntax#} function is used to introduce happens-before edges between operations.
4864-
</p>
4865-
<p>{#syntax#}AtomicOrder{#endsyntax#} can be found with {#syntax#}@import("std").builtin.AtomicOrder{#endsyntax#}.</p>
4866-
{#see_also|@atomicStore|@atomicLoad|@atomicRmw|@cmpxchgWeak|@cmpxchgStrong#}
4867-
{#header_close#}
4868-
48694859
{#header_open|@field#}
48704860
<pre>{#syntax#}@field(lhs: anytype, comptime field_name: []const u8) (field){#endsyntax#}</pre>
48714861
<p>Performs field access by a compile-time string. Works on both fields and declarations.
@@ -6241,11 +6231,13 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
62416231
</li>
62426232
<li>Are you linking libc? In this case, {#syntax#}std.heap.c_allocator{#endsyntax#} is likely
62436233
the right choice, at least for your main allocator.</li>
6234+
<li>
6235+
Need to use the same allocator in multiple threads? Use one of your choice
6236+
wrapped around {#syntax#}std.heap.ThreadSafeAllocator{#endsyntax#}
6237+
</li>
62446238
<li>
62456239
Is the maximum number of bytes that you will need bounded by a number known at
6246-
{#link|comptime#}? In this case, use {#syntax#}std.heap.FixedBufferAllocator{#endsyntax#} or
6247-
{#syntax#}std.heap.ThreadSafeFixedBufferAllocator{#endsyntax#} depending on whether you need
6248-
thread-safety or not.
6240+
{#link|comptime#}? In this case, use {#syntax#}std.heap.FixedBufferAllocator{#endsyntax#}.
62496241
</li>
62506242
<li>
62516243
Is your program a command line application which runs from start to end without any fundamental

zig/lib/compiler/aro/aro/Compilation.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ fn generateSystemDefines(comp: *Compilation, w: anytype) !void {
308308
),
309309
else => {},
310310
}
311-
if (comp.target.abi == .android) {
311+
if (comp.target.isAndroid()) {
312312
try w.writeAll("#define __ANDROID__ 1\n");
313313
}
314314

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

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
482482
.spirv,
483483
.spirv32,
484484
.loongarch32,
485-
.dxil,
486485
.xtensa,
487486
=> {}, // Already 32 bit
488487

@@ -509,7 +508,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
509508
.arc,
510509
.avr,
511510
.csky,
512-
.dxil,
513511
.hexagon,
514512
.kalimba,
515513
.lanai,
@@ -578,7 +576,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
578576
.bpfel => "bpfel",
579577
.bpfeb => "bpfeb",
580578
.csky => "csky",
581-
.dxil => "dxil",
582579
.hexagon => "hexagon",
583580
.loongarch32 => "loongarch32",
584581
.loongarch64 => "loongarch64",
@@ -655,7 +652,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
655652
.tvos => "tvos",
656653
.watchos => "watchos",
657654
.driverkit => "driverkit",
658-
.shadermodel => "shadermodel",
659655
.visionos => "xros",
660656
.serenity => "serenity",
661657
.bridgeos => "bridgeos",
@@ -693,6 +689,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
693689
.eabi => "eabi",
694690
.eabihf => "eabihf",
695691
.android => "android",
692+
.androideabi => "androideabi",
696693
.musl => "musl",
697694
.musleabi => "musleabi",
698695
.musleabihf => "musleabihf",
@@ -702,22 +699,8 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
702699
.cygnus => "cygnus",
703700
.simulator => "simulator",
704701
.macabi => "macabi",
705-
.pixel => "pixel",
706-
.vertex => "vertex",
707-
.geometry => "geometry",
708-
.hull => "hull",
709-
.domain => "domain",
710-
.compute => "compute",
711-
.library => "library",
712-
.raygeneration => "raygeneration",
713-
.intersection => "intersection",
714-
.anyhit => "anyhit",
715-
.closesthit => "closesthit",
716-
.miss => "miss",
717-
.callable => "callable",
718-
.mesh => "mesh",
719-
.amplification => "amplification",
720-
.ohos => "openhos",
702+
.ohos => "ohos",
703+
.ohoseabi => "ohoseabi",
721704
};
722705
writer.writeAll(llvm_abi) catch unreachable;
723706
return stream.getWritten();

0 commit comments

Comments
 (0)