Alex Rønne Petersen
b9456d64d7
test: mips32 is no longer a slow target with LLVM 20.
...
We can now run these tests as part of test-modules w/o -Dtest-slow-targets.
Closes #21096 .
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
7109e462b7
llvm: Use muslabin32/muslabi64 environments in the target triple.
...
Closes #2909 .
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
9a59cff27f
llvm: Allow FastISel on mips again.
...
Closes #21215 .
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
166766d63d
llvm: never_tail implies never_inline, so set noinline in this case too.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
7415739e36
Sema: Prevent tail calls of std.builtin.returnError().
...
LLVM 20 started tail-calling it in some of our test cases, resulting in:
error: AndMyCarIsOutOfGas
/home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103ef9d in main (repro)
return error.TheSkyIsFalling;
^
/home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103efa5 in main (repro)
return error.AndMyCarIsOutOfGas;
^
/home/alexrp/Source/ziglang/zig-llvm20/lib/std/start.zig:656:37: 0x103ee83 in posixCallMainAndExit (repro)
const result = root.main() catch |err| {
^
instead of the expected:
error: AndMyCarIsOutOfGas
/home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103f00d in main (repro)
return error.TheSkyIsFalling;
^
/home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103f015 in main (repro)
return error.AndMyCarIsOutOfGas;
^
/home/alexrp/Source/ziglang/zig-llvm20/repro.zig:11:9: 0x103f01d in main (repro)
try bar();
^
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
82b9d9c0f6
compiler-rt: Fix names of some float/int conversion routines for hexagon.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
858305385d
llvm: Update the list of targets that use native f16/f128.
...
Closes #22003 .
Closes #22013 .
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
cf9c6f5298
compiler: Update max int alignments for some targets.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
4c5c5bcd91
llvm: Fix i128 alignment for various targets.
...
This ABI bug was fixed in LLVM 20.
2025-04-04 06:08:10 +02:00
Alex Rønne Petersen
3d1cfdb365
llvm: Set target-abi module flag.
...
LLVM is increasingly making use of this module flag when present.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
e99c11856d
libtsan: Update to LLVM 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
d67d52abe5
zig cc: Update options data to Clang 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
8954e9748a
std.Target: Add Abi.muslf32 and Abi.muslsf.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
1599f8ade0
std.Target: Bump baseline hexagon model to hexagonv68.
...
https://github.com/llvm/llvm-project/pull/125584
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
eefb334885
std.Target: Bump baseline bpfel/bpfeb model to v3.
...
https://github.com/llvm/llvm-project/pull/131691
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
4de368a1b6
std.Target: Update CPU models/features for LLVM 20.
...
Closes #21818 .
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
8ea2e1ded5
compiler: Updates for LLVM/Clang 20 API changes.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
156ab87500
libcxx: Update to Clang 20.
...
See:
* https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319
* https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701
We're dropping support for C++03 for Zig due to the first change; it would be
insane to ship 1018 duplicate header files just for this outdated use case.
As a result of the second change, I had to bring in a subset of the headers from
llvm-libc since libc++ now depends on these. Hopefully we can continue to get
away with not copying the entirety of llvm-libc.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
7ab01c9a42
libcxxabi: Update to Clang 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
a89b343256
libunwind: Update to LLVM 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
ce754724b3
zig cc: Update intrinsic headers to Clang 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
0181cfe8ad
zig cc: Update driver files to Clang 20.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
c712f18d74
build: Update to LLVM/Clang 20.
2025-04-04 06:08:08 +02:00
Alex Rønne Petersen
50cb2fa0a2
ci: Stop triggering the workflow for llvm branches.
...
We usually do a PR for the llvm branches, so triggering a run for the branch
means we do extra work for no reason.
2025-04-04 06:06:39 +02:00
Dimitris Dinodimos
155b34ba05
Change the lld path on macos homebrew
...
Homebrew now provides lld in a separate formula; it was part of llvm
formula.
2025-04-04 06:03:19 +02:00
Alex Rønne Petersen
e9220525e8
Merge pull request #23447 from alexrp/cpuid-updates
2025-04-03 12:26:27 +02:00
Alex Rønne Petersen
bfbf4badd5
Merge pull request #23445 from alexrp/external-executor-fixes
2025-04-03 05:22:37 +02:00
Alex Rønne Petersen
e87387ee0c
std.zig.system.arm: Update some of the CPU lists based on LLVM 19.
2025-04-03 04:00:32 +02:00
Alex Rønne Petersen
8ff104380d
std.os.windows.PF: Add ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE.
2025-04-03 04:00:30 +02:00
Alex Rønne Petersen
9909465c1c
std.zig.system.darwin.macos: Handle tahiti/tupai in detectNativeCpuAndFeatures().
2025-04-03 02:42:20 +02:00
Alex Rønne Petersen
b532f6c827
std.c.darwin.CPUFAMILY: Add ARM_TAHITI and ARM_TUPAI.
2025-04-03 02:41:44 +02:00
Alex Rønne Petersen
7289a073e5
std.zig.system.x86: Synchronize CPUID/XGETBV checks with LLVM 19.
...
Also fix a bunch of cases where we didn't toggle features off if the relevant
leaf isn't available, and switch XCR0 checks to a packed struct.
Closes #23385 .
2025-04-03 02:29:26 +02:00
Alex Rønne Petersen
171cea74b6
std.zig.system: Make getExternalExecutor() allow Darling for driverkit.
2025-04-02 23:58:55 +02:00
Alex Rønne Petersen
c3f2222a59
std.zig.system: Make getExternalExecutor() less opinionated about Wasmtime.
...
Wasmtime supports both wasm32 and wasm64, and can run freestanding WASM binaries
just fine (although the usefulness of the latter is fairly limited).
2025-04-02 23:58:55 +02:00
Alex Rønne Petersen
11db7eaf4e
std.zig.system: Fix a check in getExternalExecutor() to use the host argument.
2025-04-02 23:58:54 +02:00
Alex Rønne Petersen
55ee88f9c0
std.zig.system: Fix wine executable name in getExternalExecutor().
...
I'm not actually aware of any distro where the name is wine64, so just use wine
in all cases. As part of this, I also fixed the architecture checks to match
reality.
Closes #23411 .
2025-04-02 23:58:52 +02:00
Parker Liu
de62dc884e
translate-c: fix function prototype decalared inside a function
...
* If a function prototype is declarated inside a function, do not
translate it to a top-level extern function declaration. Similar to
extern local variable, just wrapped it into a block-local struct.
* Add a new extern_local_fn tag of aro_translate_c node for present
extern local function declaration.
* When a function body has a C function prototype declaration, it adds
an extern local function declaration. Subsequent function references
will look for this function declaration.
2025-04-02 20:07:41 +00:00
Alex Rønne Petersen
9dfdf35032
Merge pull request #22337 from ruihe774/fix-app-mask
...
* std.os.linux: remove app_mask
* std.posix: on libc-less linux, block all signals in raise(), not just app_mask
2025-04-02 17:36:59 +02:00
Matthew Lugg
4303b43519
Merge pull request #22907 from MasonRemaley/import-zon-anon-type
...
Allow importing ZON without a result type (you can import build.zig.zon now)
2025-04-02 13:17:34 +01:00
Auguste Rame
bfab9582c7
DebugAllocator: Fix bucket removal logic causing segfault/leak ( #23390 )
...
Make buckets doubly linked
2025-04-02 12:15:04 +00:00
Matthew Lugg
896ffe6658
Merge pull request #22973 from MasonRemaley/zon-stop-on-node
...
Allow parsing into `Zoir.Node.Index` (it's easier to parse build.zig.zon at runtime now)
2025-04-02 12:00:23 +01:00
Misaki Kasumi
aa832d6a6d
std.os.linux: block all signals in raise
2025-04-02 18:50:14 +08:00
Mason Remaley
fa1695a8b0
std.zon.parse: make ast and zoir fields of Diagnostics non-optional
2025-04-02 06:09:21 +01:00
Mason Remaley
65649576db
std.zon.parse: rename Status to Diagnostics
...
This name is more appropriate and in line with the rest of `std`.
2025-04-02 06:08:55 +01:00
Mason Remaley
3b2fec17a4
std.zon: populate Zoir.Node.Index values with corresponding ZOIR node
...
This allows using `std.zon` to parse schemas which are not directly
representable in the Zig type system; for instance, `build.zig.zon`.
2025-04-02 06:08:04 +01:00
mlugg
dd3f01eadf
incremental: add test for ZON file without result type
2025-04-02 05:58:29 +01:00
mlugg
d8ac37fcc8
stage1: fix wasi_snapshot_preview1_fd_seek on cache files
...
`wasm2c` uses an interesting mechanism to "fake" the existence of cache
directories. However, `wasi_snapshot_preview1_fd_seek` was not correctly
integrated with this system, so previously crashed when run on a file in
a cache directory due to trying to call `fseek` on a `FILE *` which was
`NULL`.
2025-04-02 05:57:50 +01:00
Mason Remaley
87209954a7
Zcu: fix ZOIR cache bugs
...
* When saving bigint limbs, we gave the iovec the wrong length, meaning
bigint data (and the following string and compile error data) was corrupted.
* When updating a stale ZOIR cache, we failed to truncate the file, so
just wrote more bytes onto the end of the stale cache.
2025-04-02 05:54:04 +01:00
Mason Remaley
06ee383da9
compiler: allow @import of ZON without a result type
...
In particular, this allows importing `build.zig.zon` at comptime.
2025-04-02 05:53:22 +01:00
David Rubin
1b62a22268
Sema: increment extra index even if return type is generic
2025-04-02 01:34:17 +02:00