Alex Rønne Petersen
c13713dd02
std.math: Re-enable snan() test.
...
This now passes on all targets that we test in CI.
See: https://github.com/ziglang/zig/issues/14366
2024-10-02 04:08:24 +02:00
Alex Rønne Petersen
354ea625e5
test: Re-enable "bitcast nan float does not modify signaling bit" for LLVM + arm.
...
This now passes on all targets that we test in CI.
See: https://github.com/ziglang/zig/issues/14366
2024-10-02 04:08:24 +02:00
Alex Rønne Petersen
b569ead29e
std.elf: Make int() and int32() functions private.
...
These have no callers outside std.elf. Even if the standard library should
provide functions like these, std.elf is probably not the place, given how
general they are.
2024-10-01 04:35:14 +02:00
Alex Rønne Petersen
9bbfc864af
std.elf: Parse and make available some extra fields on Header.
...
Closes #19830 .
2024-10-01 03:54:42 +02:00
Alex Rønne Petersen
604ff131dd
std.elf: Add OSABI enum sourced from binutils.
2024-10-01 03:54:22 +02:00
Alex Rønne Petersen
5db04e0595
std.elf: Define EI_(OSABI,ABIVERSION,PAD) constants.
2024-10-01 03:53:58 +02:00
Alex Rønne Petersen
496a067d3f
std.elf: Define ET.(LOOS,HIOS) constants.
2024-10-01 03:53:27 +02:00
Michael Ortmann
3b465ebec5
std.start: dont query stack limit for wanted stack size 0 ( #21533 )
2024-09-28 23:06:28 -07:00
Andrew Kelley
0cdec976e4
Merge pull request #21520 from ziglang/no-formatted-panics
...
formalize the panic interface
closes #17969
closes #20240
2024-09-28 15:58:41 -07:00
Alex Rønne Petersen
537a873b17
Initial port work for *-windows-itanium support.
...
https://llvm.org/docs/HowToBuildWindowsItaniumPrograms.html
This is a weird middle ground between `*-windows-gnu` and `*-windows-msvc`. It
uses the C++ ABI of the former while using the system libraries of the latter.
2024-09-28 21:43:52 +02:00
Andrew Kelley
2857ca1edc
revert safety test cases to rely on deprecated old API
...
in case someone wants to pursue the idea of making the panic interface a
struct, this will reduce churn.
2024-09-28 12:16:41 -07:00
Jakub Konka
777e722b06
macho: increase pre-allocated vmsize for __TEXT_ZIG segment
2024-09-28 11:59:51 -07:00
Jonathan Marler
e0fdbfb705
build: make dependency cache hash map unmanaged
...
Allows Build.Graph to initialize dependency_cache with a default value.
2024-09-27 09:44:44 -06:00
Jonathan Marler
28189b0fa5
build: move dependency cache into Graph
...
The dependency cache is shared amongst all Build objects. This is currently
done by allocating a single instance and storing a reference to it in each
Build object. However, the Graph object already exists to host shared
state so by moving it there we reuse the same pattern for shared state
and avoid an extra object on the heap.
2024-09-27 09:38:59 -06:00
Andrew Kelley
737b581681
disable plan9 test
...
This experimental target has no recent active maintainer. It's the only
linker backend complaining about this branch and I can't make sense of
the stack trace.
This can be fixed asynchronously by anyone who wants to maintain plan9
support. It does not need to block this branch.
2024-09-26 21:02:14 -07:00
Andrew Kelley
2e14cbe9cd
Sema: better utility function semantics
...
better names, return error instead of panicking, better diagnostics, use
the standard APIs for resolving values
2024-09-26 20:53:26 -07:00
Andrew Kelley
5b1a9fbb45
update crash report to the new panic interface
2024-09-26 20:25:09 -07:00
Andrew Kelley
37d1da5bed
I think it's better to put the imports at the top
2024-09-26 20:24:46 -07:00
Andrew Kelley
7f4c0e010d
update safety test cases to new panic API
...
although they would also pass simply reverted to master branch because
I made the deprecated API still work for now (to be removed after 0.14.0
is tagged)
2024-09-26 17:14:17 -07:00
Andrew Kelley
db8c074476
fix still calling std.builtin.panic sometimes
2024-09-26 16:46:02 -07:00
Andrew Kelley
1b491e640d
fixes and make sema report errors when std.builtin wrong
...
instead of panicking
2024-09-26 16:06:05 -07:00
Andrew Kelley
c9c080a187
embrace panic helpers
...
Introduces `std.builtin.Panic` which is a complete interface for
panicking. Provide `std.debug.FormattedPanic` and
`std.debug.SimplePanic` and let the user choose, or make their own.
2024-09-26 16:06:05 -07:00
Andrew Kelley
fcfbedc2f0
work around riscv64 backend deficiencies
2024-09-26 16:06:05 -07:00
Alex Rønne Petersen
67f5d4f78c
link.Elf: Make getLDMOption() exhaustive with regards to LLD's parseEmulation().
2024-09-26 21:49:58 +02:00
Alex Rønne Petersen
59ae51199e
std.Target: Return EM_ARC_COMPACT instead of EM_ARC_COMPACT2 for arc.
...
Also fix an incorrect related comment in start.zig.
2024-09-26 21:45:49 +02:00
Alex Rønne Petersen
2e3599c7d0
std.Target: Handle ve in toElfMachine().
2024-09-26 21:44:27 +02:00
Andrew Kelley
231783f207
update test cases to new panic API
2024-09-26 12:35:14 -07:00
Andrew Kelley
e8887829ca
compile error instead of crash when root panic fn wrong
2024-09-26 12:35:14 -07:00
Andrew Kelley
61b20105e4
fix crash report not using mutexes correctly
2024-09-26 12:35:14 -07:00
Andrew Kelley
70746d580c
better codegen for @panic with comptime-known operand
2024-09-26 12:35:14 -07:00
Andrew Kelley
b66cc5af41
reimplement integer overflow safety panic function calls
...
in the llvm backend.
2024-09-26 12:35:14 -07:00
Andrew Kelley
f2c8940aa6
reintroduce the std.builtin safety panic helpers
...
motivated by performance
2024-09-26 12:35:14 -07:00
Andrew Kelley
76f0b6e7d8
delete the old panic stuff again
...
now that we have a zig1.wasm update it's not needed
2024-09-26 12:35:14 -07:00
Andrew Kelley
9ccf8d3332
fixes for this branch
...
I had to bring back some of the old API so that I could compile the new
compiler with an old compiler.
2024-09-26 12:35:14 -07:00
Andrew Kelley
4f8d244e7e
remove formatted panics
...
implements #17969
2024-09-26 12:35:14 -07:00
Andrew Kelley
04e694ad11
move std.time.sleep to std.Thread.sleep
2024-09-26 12:35:14 -07:00
Alex Rønne Petersen
2db3c77060
std.io.Reader: Fix test erroneously using undefined.
2024-09-26 17:04:36 +02:00
dave caruso
085cc54aad
replace TranslateC.addIncludeDir with variants with LazyPath/library names
2024-09-25 21:50:55 -07:00
pseudoc
0d00c733de
std.os.linux: extend rtattr.type to support IFA_*
...
This is a breaking change which updates the `rtattr.type` from `IFLA` to
`union { IFLA, IFA }`. `IFLA` is for the `RTM_*LINK` messages and `IFA`
is for the `RTM_*ADDR` messages.
2024-09-26 10:54:18 +08:00
Andrew Kelley
0e876a6378
Merge pull request #21514 from ziglang/elf-incr
...
elf: get incremental tests passing via `incr-check` tool
2024-09-25 19:41:13 -07:00
Andrew Kelley
4442288656
std: fix inappropriate use of unreachable in fanotify_init
2024-09-25 16:07:04 -07:00
mlugg
054dbb6798
incr-check: specify backend in manifest, allow multiple targets/backends
2024-09-25 20:39:31 +01:00
Jakub Konka
1714b74edf
incr-check: actually handle end message for a compiler update
2024-09-25 17:54:50 +02:00
Jakub Konka
1c2048ebcc
incr-check: add --debug-link flag for verbose linker logging
2024-09-25 17:54:50 +02:00
Jakub Konka
50074a835a
elf: remove unused code
2024-09-25 17:54:50 +02:00
Jakub Konka
10c68d05db
elf: change how we create new program headers
...
We do not want to create additional ones per update that are duplicates
of existing ones.
2024-09-25 17:54:50 +02:00
Jakub Konka
992c6c3f68
elf: reset output symtab contexts before re-updating
2024-09-25 17:54:50 +02:00
Jakub Konka
82cf762b02
elf: reset (merge) sections sizes before updating
2024-09-25 17:54:50 +02:00
Jakub Konka
db3db1150e
elf: do not re-create special program headers if already created
2024-09-25 17:54:50 +02:00
Jakub Konka
62c282ba46
elf: do not re-create synthetic sections if already created
2024-09-25 17:54:50 +02:00