Commit graph

33732 commits

Author SHA1 Message Date
Daniel Kongsgaard
5e3c0b7af7
Allow more operators on bool vectors (#24131)
* Sema: allow binary operations and boolean not on vectors of bool

* langref: Clarify use of operators on vectors (`and` and `or` not allowed)

closes #24093
2025-06-12 15:16:23 -07:00
Alex Rønne Petersen
4a02e080d1
Merge pull request #23912 from alexrp/mingw-update
`mingw`: Update MinGW-w64 to 38c8142f660b6ba11e7c408f2de1e9f8bfaf839e.
2025-06-12 02:51:36 +02:00
Danielkonge
f4c7290bc5 test: Enable some working vector tests
Closes #12827.
2025-06-11 22:29:51 +02:00
Alex Rønne Petersen
78d6f1c56a
mingw: Fix def file preprocessing.
This needs to actually set the target on the aro.Compilation so that we get the
expected target-specific preprocessor macros defined.
2025-06-11 20:10:15 +02:00
Alex Rønne Petersen
5e2b025f69
zig_llvm: Strip @<n> suffix from .def symbols on all targets.
We have to do this because upstream MinGW-w64 now has symbols in lib-common/
which are unconditionally decorated with @<n>.
2025-06-11 18:27:17 +02:00
Alex Rønne Petersen
879bc2e5cb
mingw: Update MinGW-w64 sources to 38c8142f660b6ba11e7c408f2de1e9f8bfaf839e. 2025-06-11 18:27:15 +02:00
Alex Rønne Petersen
0979e56bd2
mingw: Update MinGW-w64 headers to 38c8142f660b6ba11e7c408f2de1e9f8bfaf839e. 2025-06-11 15:28:36 +02:00
Alex Rønne Petersen
6671442a7c
mingw: Update MinGW-w64 definitions to 38c8142f660b6ba11e7c408f2de1e9f8bfaf839e. 2025-06-11 15:28:36 +02:00
Alex Rønne Petersen
6810ffa424
Merge pull request #24031 from ypsvlq/master
Haiku fixes
2025-06-10 17:54:19 +02:00
Andrew Kelley
4d79806459 std.Build.Step.Run: add addDecoratedDirectoryArg function
For directory arguments that need both prefix and suffix strings
appended.

Needed to unbreak ffmpeg package after fe855691f6
2025-06-09 05:25:30 -04:00
Marc Tiehuis
cffa98eef5 std.fmt.parseFloat: fix hex-float negative inf
Closes #24111.
2025-06-08 17:57:37 -04:00
Alex Rønne Petersen
201c0f54a5
Merge pull request #24117 from ziglang/cmake-arm
cmake: Fix arm/thumb arch checks
2025-06-08 09:22:55 +02:00
Alex Rønne Petersen
44155eb93c
cmake: Simplify some arm/thumb checks.
I'm not convinced that some of the possibilities that these regexes allowed are real. I've literally never seen or heard of "armhfel", nor of "thumb" ever showing up in `uname -m`, etc.
2025-06-07 22:24:09 +02:00
Alex Rønne Petersen
06d50d046a
cmake: Fix arm/thumb arch checks
Closes #24114.
2025-06-07 22:12:03 +02:00
Andrew Kelley
2e31544285 seriously don't put internpool indexes in test cases 2025-06-07 12:42:03 -07:00
Andrew Kelley
f088bb0d6e don't put intern pool indexes in test cases 2025-06-07 12:29:51 -07:00
PlayDay
3208c80f2b fix: MIME for ZIP in Zig Fetch
Closes: #24098
2025-06-07 13:14:52 -04:00
Jacob Young
857cd172d6 Dwarf: restore missing non-entry padding
Sections without padding were only supposed to omit entry padding.
Otherwise, the allocation behavior is degenerate.
2025-06-07 13:13:47 -04:00
Andrew Kelley
8b875b17ad
Merge pull request #24072 from jacobly0/x86_64-default
Compilation: enable the x86_64 backend by default for debug builds
2025-06-07 13:08:22 -04:00
Alex Kladov
173bc42744
langref: undefined _is_ materialized in all safe modes (#24107)
* trailing whitespace

* langref: undefined _is_ materialized in all safe modes

I am also not super happy about the clause that immediately follows. I
_believe_ what we want to say here is that, simultaneously:

* undefined is guaranteed to be matrerialized in in all safe modes.
  A Zig implementation that elides `ptr.* = undefined` in ReleaseSafe
  mode would be a non-conforming implementation.
* A Zig program that relies on undefined being materialized is buggy.

But I don't think it's the time to engage this level of language-lawering!
2025-06-07 10:07:53 -07:00
mlugg
aa65fd5d7c cases: fix type names
A different merge must have changed these numbers before this PR was
merged, leading to CI failures.
2025-06-07 13:06:51 -04:00
Andrew Kelley
5a52da1b7a CI: skip llvm backend tests in the script for testing x86 backend 2025-06-06 23:42:15 -07:00
Andrew Kelley
125a9aa82b restore debug llvm CI coverage
and reduce redundant coverage in slow runs to save time
2025-06-06 23:42:15 -07:00
Jacob Young
37f763560b x86_64: fix switch dispatch bug
Also closes #23902
2025-06-06 23:42:15 -07:00
mlugg
f28ef7ee29 tests: extern threadlocals require LLVM
This is a current limitation of our self-hosted linkers.
2025-06-06 23:42:15 -07:00
mlugg
437059f37c tests: avoid loading 16 MiB onto the stack
Currently, Zig semantically loads an array as a temporary when indexing
it. This means it cannot be guaranteed that only the requested element
is loaded; in particular, our self-hosted backends do not elide the load
of the full array, so this test case was crashing on self-hosted.
2025-06-06 23:42:15 -07:00
Jacob Young
0bf8617d96 x86_64: add support for pie executables 2025-06-06 23:42:14 -07:00
Jacob Young
178ee8aef1 Sema: fix invalid pure Air instruction with comptime-known operands 2025-06-06 23:42:14 -07:00
Andrew Kelley
e19886a898 Compilation.Config: prefer_llvm depends on pie 2025-06-06 23:42:14 -07:00
Andrew Kelley
d6b1ff7533 Compilation.Config: eliminate the only variable from this function 2025-06-06 23:42:14 -07:00
Andrew Kelley
2387305b23 Compilation.Config: "can_use_llvm" -> "prefer_llvm" 2025-06-06 23:42:14 -07:00
Andrew Kelley
a59d18779f langref: global assembly test depends on llvm
see #24046
2025-06-06 23:42:14 -07:00
Jacob Young
5986bdf868 Compilation: enable the x86_64 backend by default for debug builds
Closes #22257
2025-06-06 23:42:14 -07:00
Andrew Kelley
e96d86064e
Merge pull request #24090 from fardragon/handle-empty-hash
zig build: Handle empty hashes in build.zig.zon
2025-06-06 22:48:09 -04:00
mlugg
38266c5035 AstGen: fix name strategy bugs
Representing this with a `GenZir` field is incredibly bug-prone.
Instead, just pass this data directly to the relevant expression in the
very few places which actually provide a name strategy.

Resolves: #22798
2025-06-06 22:04:51 +01:00
Gungun974
21a0885ae7 Make zig fetch handle jar like zip 2025-06-06 16:59:40 -04:00
Andrew Kelley
98646e5cf8
Merge pull request #24094 from jacobly0/x86_64-ld-scripts
link: support static archives that are linker scripts
2025-06-06 16:25:17 -04:00
Andrew Kelley
bc3ce4b971 hash mismatch error: don't make empty such a special case
we can more simply use quotes instead
2025-06-06 11:16:44 -07:00
Andrew Kelley
8f7fc63847 Package.Hash.toSlice: consistent pointer
Makes the returned pointer always point inside `Hash.bytes` even when it
is length zero.
2025-06-06 11:13:36 -07:00
fardragon
3c151f0b1c Handle empty hashes in build.zig.zon 2025-06-06 11:11:49 -07:00
Alex Rønne Petersen
b6d9046242 libcxx: Fix locale-related compilation errors on NetBSD.
llvm/llvm-project#143055
2025-06-06 11:22:20 +02:00
Jacob Young
bcf387f0b9 Elf: support non-comdat groups
I haven't actually found any documentation about these, but apparently groups
aren't always comdats.
2025-06-06 00:45:37 -04:00
Jacob Young
25da0f8372 link: support static archives that are linker scripts
Note that `openLoadArchive` already has linker script support.

With this change I get a failure parsing a real archive in the self
hosted elf linker, rather than the previous behavior of getting an error
while trying to parse a pseudo archive that is actually a load script.
2025-06-06 00:04:19 -04:00
Alex Rønne Petersen
98cf81d51c test: Expand target coverage for C ABI tests. 2025-06-05 21:50:56 +02:00
Elaine Gibson
7f73187004 std.fs.Dir: haiku fixes 2025-06-05 13:45:52 +01:00
Elaine Gibson
ed48e2eb75 std.crypto.Certificate.Bundle: haiku support 2025-06-05 13:45:52 +01:00
Elaine Gibson
2e5b3b5c7c build runner: disable fuzz in single-threaded builds 2025-06-05 13:45:52 +01:00
Elaine Gibson
2cfa0f567d std.Build.Watch: not supported on haiku 2025-06-05 13:45:47 +01:00
Elaine Gibson
2139eb75f9 std.c: getcontext is not supported on haiku 2025-06-05 12:30:54 +01:00
Elaine Gibson
8910ac2ba8 std.c.SOCK: define NONBLOCK and CLOEXEC for haiku 2025-06-05 12:30:54 +01:00