Jakub Konka
0769afbb0f
macho: refactors errors from parsing DWARF
...
Currently we don't report any errors to the user due to a bug in
self-hosted x86_64-macos backend.
2024-12-02 22:05:21 -05:00
Jakub Konka
c824b35051
macho: move things around in MachO/Object.zig and refactor
2024-12-02 22:05:21 -05:00
Jakub Konka
8e81500051
macho: handle DWARFv5 when parsing debug info in objects
2024-12-02 22:05:21 -05:00
Jakub Konka
808306f49a
macho: rename dwarf.zig to Dwarf.zig
...
Separate commit since macOS is case-insensitive by default and so
I had to do it from Linux.
2024-12-02 22:05:21 -05:00
Jacob Young
c013f45ad0
coff: fix memory leak
2024-12-02 16:01:58 -05:00
Alex Rønne Petersen
5c6b25d9bb
Merge pull request #22115 from alexrp/x32-tests
...
`test`: Add `x86_64-linux-(gnux32,muslx32)` to module tests.
2024-12-01 13:43:16 +01:00
Alex Rønne Petersen
1731510933
test: Add x86_64-linux-(gnux32,muslx32) to module tests.
2024-12-01 02:23:55 +01:00
Alex Rønne Petersen
14c79203c4
std.os.linux: Fix fadvise64 syscall selection for n32/x32.
2024-12-01 02:23:55 +01:00
Tw
aa7d138462
zig fetch: add missing path separator in error message
...
Signed-off-by: Tw <tw19881113@gmail.com>
2024-11-29 18:50:21 -05:00
Andrew Kelley
8d8801c96d
Merge pull request #19968 from wooster0/eql
...
std.mem.eql: make comparisons for zero-sized and non-sized types work
2024-11-29 16:19:39 -05:00
Pat Tullmann
5e1a83ad29
defaultPanic: @trap on 'other' target
...
The freestanding and other OS targets by default need to just @trap in the
default Panic implementation.
And `isValidMemory` won't work with freestanding or other targets.
Update the unwind_freestanding.zig test case to also run on the 'other' OS
target, too. This should keep the Zig's stacktrace generation from
regressing on the standalone targets.
2024-11-29 15:30:05 -05:00
Andrew Kelley
a47aa9dd9d
Merge pull request #22095 from alexrp/test-llvm-emit
...
Change `llvm_targets` tests to actually emit objects, and fix bugs found as a result
2024-11-29 15:28:54 -05:00
mlugg
c3821fe4ca
compiler: use @Type instead of @TypeOf to print enum literal type
2024-11-29 15:26:58 -05:00
Rohan Vashisht
88d57917b7
Updated ascii.zig's isWhitespace function to use switch instead of for loop. ( #22094 )
2024-11-29 12:26:23 -08:00
Justin Braben
07cd488d42
Add build option to set tracy-callstack-depth in build.zig ( #21990 )
2024-11-29 12:13:06 -08:00
Jay Petacat
97b8d662e6
std.Build: Detect pkg-config names with "lib" prefix
2024-11-29 15:11:14 -05:00
Andrew Kelley
cfdb001a8f
Merge pull request #22099 from Rexicon226/fix-cat-mul
...
change `++` and `**` to not return mutable pointers
2024-11-29 15:05:49 -05:00
David Rubin
77f16d457b
test: adjust behaviour test to new concat/mul semantics
2024-11-28 18:05:36 -08:00
David Rubin
1d78d4f8c1
sema: hotpath ++ and ** for array-pointers
2024-11-28 18:05:36 -08:00
Alex Rønne Petersen
4a73b8cbb3
std.builtin: Add VaListXtensa.
2024-11-28 23:31:11 +01:00
Alex Rønne Petersen
78b8ce5095
test: Change llvm_targets to actually emit an object for each target.
...
Without doing this, we don't actually test whether the data layout string we
generate matches LLVM's.
A number of targets had to be commented out due to this change:
* Some are using a non-working experimental LLVM backend (arc, csky, ...).
* Some don't have working LLD support (lanai, sparc, ...).
* Some don't have working self-hosted linker support (nvptx).
* Some are using ABIs that haven't been standardized (loongarch32).
Finally, all non-x86 uefi targets are hopelessly broken and can't really be
fixed until we change our emit logic to lower *-uefi-* verbatim rather than to
*-windows-*. See: https://github.com/ziglang/zig/issues/21630
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
0bf054f4c5
test: Remove aarch64(_be)-linux-gnuilp32 from llvm_targets.
...
LLVM doesn't handle this target correctly (pointer size, etc).
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
abf3032ff1
test: Add m68k-linux-musl to llvm_targets.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
322013c648
test: Add aarch64(_be)-linux-musl to llvm_targets.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
11d51ea5a2
test: Remove aarch64-rtems-ilp32 from llvm_targets.
...
LLVM can't represent this target at the moment.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
4369d3b93d
test: Add *-windows-cygnus triples to llvm_targets.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
7361f0bafa
link.MachO: Don't try to get a semver value for bridgeos.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
f0f2dc52cc
llvm: Lower ohoseabi to ohos instead of verbatim.
...
LLVM doesn't recognize ohoseabi.
2024-11-28 22:04:00 +01:00
Alex Rønne Petersen
7fe219998f
std.Target: Fix long double alignment for wasm(32,64)-emscripten-*.
2024-11-28 21:31:28 +01:00
Alex Rønne Petersen
6cd67cec67
std.Target: Fix long double size for aarch64-bridgeos-*.
2024-11-28 21:31:28 +01:00
Alex Rønne Petersen
310d1c1ff4
std.Target: Fix long/unsigned long size for aarch64-watchos-ilp32.
2024-11-28 21:31:28 +01:00
Alex Rønne Petersen
aea4f705dc
std.Target: Add missing C type info for aix, elfiamcu, hermit, hurd, rtems, and zos.
2024-11-28 21:31:28 +01:00
Andrew Kelley
182cdf74bf
Merge pull request #22087 from ziglang/std.ArrayHashMap
...
std.ArrayHashMap: add `reinit` method and other housekeeping, including the move towards "unmanaged" containers
2024-11-28 14:07:30 -05:00
Alex Rønne Petersen
8594f179f9
Merge pull request #22067 from alexrp/pie-tests
...
Add PIC/PIE tests and fix some bugs + some improvements to the test harness
2024-11-28 14:07:28 +01:00
David Rubin
bc3094b278
sema: make ++ and ** return immutable pointers
2024-11-27 20:39:23 -08:00
Andrew Kelley
e374483d67
std.ArrayHashMap: update to the "gpa"/"arena" convention
...
for Allocator names
2024-11-27 14:35:01 -08:00
Andrew Kelley
20215a376c
prepare to remove the "Managed" variant of std.ArrayHashMap
2024-11-27 14:34:27 -08:00
Andrew Kelley
da6e80c30a
std.ArrayHashMap: explicit error sets
2024-11-27 14:34:26 -08:00
Andrew Kelley
c9c7ede2f9
introduce std.ArrayHashMap.reinit
2024-11-27 14:34:08 -08:00
Alex Rønne Petersen
6cf01a679f
std.Thread.Futex: Mark inline asm volatile in WasmImpl.
...
Closes #22082 .
2024-11-27 23:24:37 +01:00
Justin Braben
d16a9b0acb
std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice ( #21938 )
2024-11-27 22:33:29 +01:00
mlugg
1a99c99ee9
std.Build: gracefully handle child stdin closing when running tests
...
We have deduced that it seems the sporadic BrokenPipe failures happening
on the CI runners (e.g.
https://github.com/ziglang/zig/actions/runs/12035916948/job/33555963190 )
are likely caused by the test runner's stdin pipe abnormally closing,
likely due to the process crashing. Here, we introduce error handling
for this case, so that if these writes fail, the step is marked as
failed correctly, and we still collect the child's stderr to report.
This won't fix the CI issues, but it should promote them to proper error
messages including child stderr, which -- at least in theory -- should
allow us to ultimately track down where the errors come from.
Note that this change is desirable regardless of bugs in the test runner
or similar, since the child process could terminate abnormally for any
number of reasons (e.g. a crashing test), and such cases should be
correctly reported by the build runner.
2024-11-27 19:35:31 +00:00
Andrew Kelley
3ce6de8765
revert langref section "common errdefer slip ups"
...
This does not belong in the language reference.
reverts 91a88a789ffa80ebb57c77ae0fe37594276e3707
2024-11-26 15:03:24 -08:00
Andrew Kelley
11bf2d92de
diversify "unable to spawn" failure messages
...
to help understand where a spurious failure is occurring
2024-11-26 13:56:40 -08:00
Andrew Kelley
68b3f50866
Merge pull request #22070 from Rexicon226/fix-crc32
...
add `crc32` as a feature dep of `sse4.2` and refactor `update_cpu_feature.zig`
2024-11-26 16:29:51 -05:00
Alex Rønne Petersen
047311a76a
std.math: Disable isSignalNan test on mips32.
...
https://github.com/ziglang/zig/issues/14366
2024-11-26 18:29:13 +01:00
Chris Boesch
87863a834b
std.math.complex: Add squared magnitude function ( #21998 )
2024-11-26 13:03:48 +00:00
Andrew Kelley
b0dcce93f7
Merge pull request #22075 from ziglang/fix-broken-pipe
...
std.io.Poller: handle EPIPE as EOF
2024-11-26 00:36:33 -05:00
David Rubin
a6af55cc6e
ip: cleanup @constCast usages
2024-11-25 18:41:36 -05:00
Andrew Kelley
f6392b9526
cmake: don't add an unnecessary curses static lib dependency
2024-11-25 15:05:42 -08:00