0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
Commit graph

40,704 commits

Author SHA1 Message Date
Jacob Young
203bbaee07 main: support multiple non-incremental protocol update messages 2026-10-21 10:04:01 -07:00
Jacob Young
f08a8f0fc2 main: reimplement compiler debug flags
* Add `.llvmbc`/`.llvmir` to `ObjectFormat` for emitting unoptimized IR
* Replace `--verbose-air`, `--verbose-intern-pool`,
  `--verbose-generic-instances`, `--verbose-llvm-ir`, and
  `--verbose-llvm-bc` with various `--debug-log` scopes
  * `--debug-log illegal-air`: pre-legalized Air
  * `--debug-log legal-air`: post-legalized Air
  * `--debug-log air`: final Air with liveness
  * `--debug-log ip-stats`: InternPool statistics
  * `--debug-log ip-values`: InternPool values
  * `--debug-log ip-generic-instances`: InternPool generic instances
  * `--debug-log llvm-ir`: pre-optimized LLVM IR
  * `--debug-log opt-llvm-ir`: post-optimized LLVM IR
* Delete `--verbose-cimport` which does nothing
* Delete `--verbose-llvm-cpu-features` which is equivalent to looking at
  the outputs of `--show-builtin` and `--debug-log llvm-ir`
2026-10-21 10:04:01 -07:00
Jacob Young
77576c9603 lldb/pretty_printers.py: support new MultiArrayList.pointer_stability
Also fix unwrapped printing of reified union types.
2026-10-21 10:04:01 -07:00
Jacob Young
baed9626d0 Sema: check slice load for uninstantiable element type 2026-10-21 10:04:01 -07:00
Jacob Young
07ea1c97ee process: fix bsd spawn 2026-10-21 10:04:01 -07:00
Andrew Kelley
ed136f8306 Merge pull request 'compiler_rt: support targets where c_longdouble is not a valid type' (#37324) from jacobly/invalid-c-longdouble into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37324
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-21 19:01:01 +02:00
Jacob Young
e5e0b6ae52 llvm: implement bitcast without the help of a legalize feature
Closes #37188
2026-10-21 18:58:31 +02:00
Andrew Kelley
c79058895b Merge pull request 'std.json: update usages of array_list.Managed to ArrayList' (#37291) from mcrtin/array-list-unmanaged into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37291
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-21 18:57:34 +02:00
Andrew Kelley
d1f80fe106 Merge pull request 'Sema: allow splatting to scalar types' (#37349) from masonremaley/generic-splat into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37349
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-21 18:56:30 +02:00
Robbie Lyman
755d09660d fix(Io.Dispatch): synchronize with updates to VTable
This is a minimal set of changes to let a test program which uses
Dispatch to sleep to compile.
2026-10-21 18:52:45 +02:00
Mason Remaley
bd2db84eed Remove no longer necessary splat helper from x86_64 backend tests 2026-10-21 02:17:59 -07:00
Mason Remaley
e572063f92 Allow splatting to scalar types
This makes writing code that is generic over scalar and vector
types easier. In particular, this helps when multiplying a generic
argument by a constant, or passing a generic arugment alongside a
scalar value to a function or builtin such as `@mulAdd`.

This also has the side benefit of making the implicit splat for
some binary operations as suggested by @SpexGuy in #35376 simpler
to implement for inplace arithmetic operations.

part of #35376
2026-10-21 02:17:59 -07:00
Ryan Liptak
8f0c6ce407 Merge pull request 'Allow \u escape sequences to encode surrogate code points' (#36965) from squeek502/zig:surrogates into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36965
2026-10-21 09:43:04 +02:00
Fateme Hosseini
3c08167cb7
compiler-rt: add hexagon v79 QFloat HVX runtime conversion funcs
Add four assembly files for half-float to integer conversions using
QFloat (qf16) on Hexagon V79.

Each function provides IEEE round-to-nearest-even or fast
round-half-away-from-zero conversion for signed and unsigned 8-bit and
16-bit integer destinations.

V79 lacks direct half-float to integer conversion. V75 and below have
native IEEE vcvt instructions,
while V81 and newer have dedicated hardware support.

Co-authored-by: Sumanth Gundapaneni <sgundapa@quicinc.com>
2026-10-21 06:08:50 +02:00
Jacob Young
b2d0675f90 Type: make c_longdouble an invalid type without x87
Also invert `xclang_flags` loop nesting which will make it easier to
translate features to something without `-Xclang` in the future.
2026-10-20 15:47:57 -04:00
Jacob Young
d85c0ba080 compiler_rt: support targets where c_longdouble is not a valid type 2026-10-20 15:45:44 -04:00
Andrew Kelley
c8bb44618a Merge pull request 'naked package metadata' (#37340) from naked-package-labeling into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37340
2026-10-20 19:10:07 +02:00
mlugg
67f773beae Merge pull request 'Elf2: refactors, fixes, and performance enhancements' (#37326) from mlugg/elf2-thingies into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37326
2026-10-20 15:27:17 +02:00
Alex Rønne Petersen
4bf2fe2ed8
compiler_rt.fmv: remove __aarch64_have_lse_atomics
Turns out this is not actually part of the FMV ABI.
2026-10-20 10:30:47 +02:00
Alex Rønne Petersen
a0f9377690
compiler_rt.fmv: avoid depending on @import("aarch64_outline_atomics.zig").__aarch64_have_lse_atomics 2026-10-20 10:09:01 +02:00
Alex Rønne Petersen
6d24378a30 Merge pull request 'Linux 7.3' (#37333) from alexrp/zig:linux-7.3 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37333
2026-10-20 09:53:06 +02:00
Alex Rønne Petersen
e771583d88 Merge pull request 'std.Target: more fixes' (#37334) from alexrp/zig:target-fixes into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37334
2026-10-20 09:52:48 +02:00
Alex Rønne Petersen
099361c146
compiler_rt: define a stub for the function multiversioning ABI
To make sure that we can link code that uses FMV, even if for now we just
conservatively use the slowest variant of a function.
2026-10-20 09:39:43 +02:00
Alex Rønne Petersen
ffe1510d29
std.Target: drop the baseline CPU for hppa from pa_7300lc to pa_7000
This is what Debian and Gentoo support as their baseline.
2026-10-20 06:13:01 +02:00
Alex Rønne Petersen
a0d8ee3fde
std.Target: drop the baseline CPU for kvx from coolidge_v2 to coolidge_v1
This is the default in the Linux kernel and GCC ports for kvx.
2026-10-20 06:13:00 +02:00
Alex Rønne Petersen
9bcc2b6c8c
std.Target: drop the baseline CPU for alpha from ev6 to ev56
This is the baseline for the Linux kernel.
2026-10-20 06:13:00 +02:00
Alex Rønne Petersen
4251faf035
test-c-abi: skip some vector cases on arm regardless of float ABI
These cases only worked by accident when neon was enabled. The change to the arm
baseline model from neon to vfp3d16 exposed these failures.
2026-10-20 06:13:00 +02:00
Alex Rønne Petersen
b0ce4f0996
update_cpu_features: omit more optional arm features
Both on models and architecture levels this time.

As part of this, I removed neon from the baseline model because that isn't
actually part of the ARMv7 baseline on any platform I'm aware of, and it made
our baseline binaries not work on some real boards, e.g. Tegra 2. We keep
vfp3d16 since virtually every ARMv7 board has VFP.

To not regress PlayStation Vita performance, I also added a kermit model with
neon enabled. This was necessary since vortex_a9 lost all NEON/VFP features by
default.
2026-10-20 05:37:12 +02:00
Alex Rønne Petersen
4df6044165
update_cpu_features: s/cpu/model/g 2026-10-20 04:34:30 +02:00
Alex Rønne Petersen
373ae07113
update_cpu_features: add and use cpu_overrides field
It was really confusing that feature_overrides was pulling double duty for both
features and models. Now there's a clean split between the two. The new
cpu_overrides also subsumes omit_cpus. This in turn uncovered a bug where some
x86 models were not getting the smep/smap features.
2026-10-20 04:29:49 +02:00
Alex Rønne Petersen
e76f969f1a
update_cpu_features: flesh out ve data 2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
acc1233c8b
update_cpu_features: refine the set of wasm models 2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
77178704d1
update_cpu_features: add some missing wasm feature dependencies 2026-10-20 03:29:36 +02:00
Alex Rønne Petersen
0f09c3c55a
update_cpu_features: flesh out xcore data
LLVM's backend is very outdated so we can't extract any useful data from it.
2026-10-20 03:29:33 +02:00
Alex Rønne Petersen
39ca9cae43
update_cpu_features: omit/flatten a bunch of csky features 2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
aac91a1ac8
update_cpu_features: omit the dummy and dwarfris bpf features 2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
125917c069
update_cpu_features: delete hppa 64bit feature
The hppa64 arch tag specifies whether we're in 64-bit mode. At that point, the
64bit feature is strictly redundant with v2_0.
2026-10-20 02:55:29 +02:00
Alex Rønne Petersen
7ae9b045a8
update_cpu_features: fix kvx v3_2 feature to not imply v3_1
These have incompatible instruction encodings.
2026-10-20 02:55:26 +02:00
Alex Rønne Petersen
bb1900c95d
update_cpu_features: fix description of alpha fix feature
🤨
2026-10-20 02:55:17 +02:00
Alex Rønne Petersen
dff54eecb0
update_cpu_features: omit optional features on some ARM models by default
ARM insist on having these enabled in LLVM's CPU model definitions by default
despite them not actually being required, so we have to do this.
2026-10-20 02:55:15 +02:00
Andrew Kelley
ffa20b6deb Fetch: only use name for naked packages if version specified 2026-10-19 17:46:04 -07:00
Alex Rønne Petersen
cfec358de1
compiler_rt.atomics: lanai does not support atomic instructions 2026-10-20 02:36:38 +02:00
Andrew Kelley
4fc40330a4 ability to label naked packages
dependencies inside build.zig.zon now support `paths` and `version`
fields which can be used to affect the filtered files of the package as
well as the hash.
2026-10-19 17:34:42 -07:00
Matthew Lugg
6a5ce4aa99
link.Dwarf: match new Dwarf2 extern representation
A previous commit in this branch changed how `link.Dwarf2` represents
`extern`s. The legacy `link.Dwarf` implementation, used by the old ELF
linker, did not have this change, which led to deviations in debugger
output. This commit brings them back into sync.
2026-10-19 18:30:35 +01:00
Matthew Lugg
f7626b9526
Elf2: don't emulate a ZCU input object when building a static library
In this case, there is a *literal* ZCU input object in the static
library itself. This was causing a safety check to occasionally trip in
safe compiler builds. First noticed when debugging an unrelated issue:
see https://codeberg.org/ziglang/zig/issues/37327#issuecomment-25643513.
2026-10-19 18:30:35 +01:00
Matthew Lugg
f67c5e92fc
build.zig: add file/directory dependencies searching for config.h 2026-10-19 18:30:35 +01:00
Matthew Lugg
067f8dcb37
std.Build.Cache: support depending on nonexistent file/directory 2026-10-19 18:30:35 +01:00
Matthew Lugg
19c4660c77
Maker: fix error handling bugs in configure 2026-10-19 18:30:35 +01:00
Matthew Lugg
c3b8abfc26
std.Build.Cache: fix diagnostic printing 2026-10-19 18:30:35 +01:00
Matthew Lugg
f83d28d5c6
Elf2: rework segment vaddr allocation logic
The main goal here was to fix a source of non-determinism leading to
unreproducible output binaries. However, I also ended up simplifying the
logic considerably by determining that the ability for segments to jump
over one another was of little to no practical benefit. This was because
by doing so, the segment would intrude on the ability of a different
segment to grow in-place; so while it may limit the need for further
segment movement right away, it made it more likely to occur in the near
future, and these effects largely canceled out. Therefore, the linker
now preserves the order of segments at all times. This makes SPARC less
of a special case, and might make it slightly easier to design our
alternative to linker scripts in the future.
2026-10-19 18:30:35 +01:00