Alex Rønne Petersen
be24821464
ci: remove superfluous -Dtarget=native-native-none in x86_64-freebsd scripts
2025-09-26 02:41:28 +02:00
Alex Rønne Petersen
86077fe6bd
compiler: move self-hosted backends from src/arch to src/codegen
2025-09-26 02:02:07 +02:00
Alex Rønne Petersen
212715f62d
test: remove pie test case from test-standalone
...
We already have test/cases/pie_linux.zig covering this.
2025-09-26 01:33:38 +02:00
Alex Rønne Petersen
459ad8c8e6
ci: stop passing -Dskip-translate-c -Dno-langref on loongarch64-linux
...
No longer necessary since we've stopped using Clang for this.
2025-09-26 01:33:38 +02:00
Alex Rønne Petersen
17f9a25924
test: remove -Dskip-translate-c from test-standalone
...
No longer necessary since we've stopped using Clang for this.
2025-09-26 01:33:26 +02:00
Andrew Kelley
2a88a6a456
Merge pull request #24497 from ziglang/aro-translate-c
...
compiler: update aro and translate-c to latest; delete clang translate-c
2025-09-25 14:18:49 -07:00
Alex Rønne Petersen
a73f246b29
std.Thread: disable test on armeb in addition to thumbeb
...
Same falky failure on both. See ed7ff0b693037078f451a7c6c1124611060f4892.
2025-09-25 17:49:47 +02:00
Alex Rønne Petersen
dd4be26f53
libc-test: disable daemon-failure.c
...
It's flaky in that systems with a high FD limit will get an unexpected ENOMEM
error from daemon(), failing the test.
2025-09-25 12:57:56 +02:00
Jacob Young
6257f4abb7
x86_64: improve support for large enums
...
Closes #25247
2025-09-24 21:20:27 -07:00
Andrew Kelley
5f763b7dc5
resinator: work around error VARARGS not implemented for this compiler
2025-09-24 21:04:46 -07:00
Zhenming-Lin
99323a4da1
improve impl of __floorh, __floorx, __ceilh and __ceilx
2025-09-24 20:57:25 -07:00
Andrew Kelley
41e5331c08
resinator: fix compile errors
2025-09-24 20:35:01 -07:00
Veikka Tuominen
d83c76eb5a
update aro & translate-c
2025-09-24 20:01:19 -07:00
Andrew Kelley
e05073b9e4
aro does not have -mmacos version flags or -Wno-overriding-option
2025-09-24 20:01:19 -07:00
Andrew Kelley
3764f7b0f2
compiler: disable InternPool.debug_state as it is unsound
...
There can be more than one InternPool instance active at the same time.
2025-09-24 20:01:19 -07:00
Andrew Kelley
aa92c237e9
aro does not have a pragma-pack warning
2025-09-24 20:01:19 -07:00
Andrew Kelley
8cba6b1df8
aro: update
...
This is f5fb720a5399ee98e45f36337b2f68a4d23a783c plus ehaas's nonnull
attribute pull request currently at 4b26cb3ac610a0a070fc43e43da8b4cdf0e9101b
with zig patches intact.
2025-09-24 20:01:19 -07:00
Andrew Kelley
01132e0cf8
remove behavior test that depended on std.zig.c_translation
...
behavior tests may not depend on this namespace.
2025-09-24 20:01:19 -07:00
Andrew Kelley
79d9997d22
delete @cImport tests
...
These are now maintained in a separate repository: ziglang/translate-c
2025-09-24 20:01:19 -07:00
Andrew Kelley
e1d6f478c9
@cImport: don't pass args to Aro it doesn't understand
2025-09-24 20:01:19 -07:00
Andrew Kelley
9ad1e83e63
zig fmt
2025-09-24 20:01:19 -07:00
Andrew Kelley
f4d328e2ac
Compilation: use renameTmpIntoCache
...
solves several problems with this pattern
2025-09-24 20:01:19 -07:00
Andrew Kelley
f0d3b7abb8
aro: fix dep file logic
...
also add ability to omit main source file from dep file as it messes up
caching strategy
2025-09-24 20:01:19 -07:00
Andrew Kelley
9e979e5a9d
Compilation: re-implement cImport
2025-09-24 20:01:19 -07:00
Andrew Kelley
ea169e6ccf
std.Build.Cache: clarify parameter is sub path, not basename
2025-09-24 20:01:19 -07:00
Andrew Kelley
b6930097ec
translate-c: update for array list defaults
2025-09-24 20:01:19 -07:00
Andrew Kelley
e5f4dbdf8a
fix rebase conflicts
2025-09-24 20:01:19 -07:00
Andrew Kelley
2f00b630f2
remove c_builtins.zig from cmake
2025-09-24 20:01:19 -07:00
Andrew Kelley
0f88f9c664
aro: avoid BoundedArray
2025-09-24 20:01:19 -07:00
Veikka Tuominen
21f5f06f1f
Compilation: avoid passing Clang specific options to Aro
2025-09-24 20:01:18 -07:00
Veikka Tuominen
e7a622fb33
update aro and translate-c sources
2025-09-24 20:01:18 -07:00
Ryan Liptak
e8e8d7e5c8
resinator: Update for latest aro
2025-09-24 20:01:18 -07:00
Andrew Kelley
01d993b230
add translate-c CLI args
2025-09-24 20:01:18 -07:00
Andrew Kelley
8e27821b60
simplify diagnostics
2025-09-24 20:01:18 -07:00
Andrew Kelley
d1820d2a3e
delete enough aro to make it compile
2025-09-24 20:01:18 -07:00
Andrew Kelley
328280b566
move translate-c helpers
2025-09-24 20:01:18 -07:00
Andrew Kelley
1bdcdbd996
delete all the translate-c tests
...
the ziglang/translate-c package has its own test suite, so these are
redundant
2025-09-24 20:01:17 -07:00
Andrew Kelley
f49a54745b
compiler: update aro and translate-c to latest; delete clang translate-c
2025-09-24 19:57:28 -07:00
Alex Rønne Petersen
91b0adc4c1
Merge pull request #25231 from taylordotfish/bugfix/ppc-restore_rt
...
Fix `restore_rt` on PowerPC and remove unnecessary clobbers
2025-09-25 01:31:24 +02:00
Jacob Young
4a344de651
MappedFile: fix the insert range path not updating the root node
2025-09-24 16:09:46 -07:00
Jacob Young
94d319a10f
x86_64: support more in/out forms
...
Closes #25303
2025-09-24 16:09:14 -07:00
Jacob Young
561e556aaf
target: check for backend support for the new linker
...
Closes #25343
2025-09-24 16:08:26 -07:00
rpkak
9b3b7aa911
Integrate libc-test cases into the build system
...
zig build test-libc -Dlibc-test-path=/path/to/libc-test
2025-09-24 16:05:18 -07:00
rpkak
4fb08986cb
optimize std.mem.swap
2025-09-24 12:29:43 -07:00
taylor.fish
c73df65ded
Don't specify clobbers in restore_rt
...
Per @alexrp, this is unnecessary in naked functions.
2025-09-23 21:03:28 -07:00
taylor.fish
7f49dae284
Fix PowerPC restore_rt
...
Clang fails to compile the CBE translation of this code ("non-ASM
statement in naked function"). Similar to the implementations of
`restore_rt` on x86 and ARM, when the CBE is in use, this commit employs
alternative inline assembly that avoids using non-immediate input
operands.
2025-09-23 20:47:34 -07:00
Carter Snook
5bf52a6f50
std: always allow spawning processes when an env map is explicitly provided ( #25092 )
...
In a library, the two `builtin.link_libc` and `builtin.output_mode ==
.Exe` checks could both be false. Thus, you would get a compile error
even if you specified an `env_map` at runtime. This change turns the
compile error into a runtime panic and updates the documentation to
reflect the runtime requirement.
2025-09-24 03:12:28 +02:00
rpkak
bc512648db
use copy_file_range syscall on linux
2025-09-24 03:08:12 +02:00
Kyle Schwarz
6260d2772f
glibc: guard inet-fortified.h
2025-09-24 02:55:50 +02:00
taylor.fish
bdca0f93c4
Fix PowerPC syscalls causing invalid code from CBE
...
Fixes #25209 .
On PowerPC, some registers are both inputs to syscalls and clobbered by
them. An example is r0, which initially contains the syscall number, but
may be overwritten during execution of the syscall.
musl and glibc use a `+` (read-write) constraint to indicate this, which
isn't supported in Zig. The current implementation of PowerPC syscalls
in the Zig standard library instead lists these registers as both inputs
and clobbers, but this results in the C backend generating code that is
invalid for at least some C compilers, like GCC, which doesn't support
the specifying the same register as both an input and a clobber.
This PR changes the PowerPC syscall functions to list such registers as
inputs and outputs rather than inputs and clobbers. Thanks to jacobly0
who pointed out that it's possible to have multiple outputs; I had
gotten the wrong idea from the documentation.
2025-09-24 02:54:55 +02:00