25641 Commits

Author SHA1 Message Date
Jakub Konka
bff54536ff macho: check if we should emit LC_VERSION_MIN_ if target low enough 2023-09-04 09:07:49 +02:00
Krzysztof Wolicki
5cc1831ca4
autodoc: Fix rendering of enum types (#17058) 2023-09-03 18:34:29 +02:00
Loris Cro
e5c72a32a7 autodoc: fix rendering of std.json.ObjectMap
closes #17014
supersedes #17022
follow up issue #17061
2023-09-03 18:32:26 +02:00
Krzysztof Wolicki
555028086a
autodoc: Implement @call, @unionInit, @mulAdd support (#16918)
* autodoc: Implement `@call`, `@unionInit`, `@mulAdd` support

* autodoc: Implement builtinIndex in ex
2023-09-03 17:20:23 +02:00
Krzysztof Wolicki
86a9e1deaf
autodoc: Implement @bitSizeOf rendering in main.js (#16895) 2023-09-03 17:18:51 +02:00
Krzysztof Wolicki
80c1d48ccb
autodoc: Implement a[b], a.?, and a.* (#16863)
* autodoc: Implement elem_val_node and basic optional_payload_*

* autodoc: Add `.*` loads
2023-09-03 17:18:16 +02:00
Loris Cro
0516a4d629 autodoc: fix typo 2023-09-03 17:15:15 +02:00
Loris Cro
c0da41582b autodoc: better light mode colors
fix #15799
2023-09-03 17:12:52 +02:00
James Chen-Smith
c3a8f1fe92
autodoc: Extract decl ref style and fix light mode color (#15990)
Co-authored-by: James Chen-Smith <james@chen-smith.net>
Co-authored-by: Loris Cro <kappaloris@gmail.com>
2023-09-03 16:51:07 +02:00
Ambareesh "Amby" Balaji
62f727eedb std.fs: Fix typo in accessAbsoluteW 2023-09-03 12:03:14 +02:00
Michael Dusan
3cf71580c4 build stage3: detect system libcxx
Detect system libcxx name with the CMake build system and convey that
information to build.zig via config.h so that the same system libcxx is
used for stage3.

This undoes the hacky search 901457d173467c71b681a8c69f4b77c94d516da7 .

closes #17018
2023-09-03 08:38:03 +02:00
Jan Philipp Hafer
1816bb4ab0 std.os+windows: isAtLeast(.win10_rs5) in renameatW(), DeleteFile() for posix semantics
Usage of FILE_RENAME_IGNORE_READONLY_ATTRIBUTE or
FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE for posix semantics require
win10_rs5 instead of win10_rs1 necessary for posix semantics. Keep it as simple
as possible, since it is reasonable to expect users being able to update
win10_rs5 or use non-posix semantics instead.

Closes #17049.
2023-09-03 08:35:26 +02:00
Jakub Konka
e265dc61e6
Merge pull request #17057 from ziglang/elf-symtab
elf: write all symbols in bulk in flush
2023-09-03 07:52:17 +02:00
Jakub Konka
baea106b71 elf: mark dirty .symtab shdr after updating sh_info field 2023-09-02 23:00:39 +02:00
Josh Wolfe
8b74eae9c6
std.ArrayHashMap.reIndex also recomputes hashes (#17054) 2023-09-02 17:00:20 -04:00
Jakub Konka
cfc0429bc9 elf: correctly set symtab's sh_info to first global index 2023-09-02 22:12:49 +02:00
Jakub Konka
9bd60bef2a elf: write all symbols in bulk in flush
This avoids leaving undefined bytes in the output file in case
a decl has been garbage collected before it's been committed into
the binary.

This should have minimal impact on performance since we have to
write globals on every iteration anyway.
2023-09-02 21:49:33 +02:00
Jakub Konka
da56727e6a elf: write symbol names into .strtab rather than .shstrtab 2023-09-02 15:17:44 +02:00
Jakub Konka
cf3a6fe0f5 dwarf: fix copy-paste typo in variable lowering code for reg and stack 2023-09-02 09:40:12 +02:00
Michal Ziulek
bb2eb44430 std.coff: Fixed compile error. 2023-09-02 00:18:53 +02:00
Jakub Konka
5dc2db8055
Merge pull request #17029 from squeek502/wasi-statFile-libc
Fix `Dir.statFile` for WASI when linking libc
2023-09-01 10:13:04 +02:00
Jakub Konka
43b27d47c9
Merge pull request #17030 from ziglang/macho-libsystem
macho: improve logic for finding and reporting errors when searching for libSystem and dependencies
2023-09-01 08:00:12 +02:00
Ryan Liptak
01f9cdd21a Temporarily disable Dir.statFile test when linking glibc
See https://github.com/ziglang/zig/issues/17034
2023-08-31 18:01:15 -07:00
Jakub Konka
2187744411 macho: we actually care about stem and not basename for dependencies 2023-09-01 00:43:02 +02:00
Jakub Konka
611ddd426c macho: forgot to include dirname when resolving dependencies 2023-09-01 00:30:26 +02:00
Jakub Konka
21c04b119e macho: report missing libSystem/libc system libraries to the user 2023-08-31 23:47:55 +02:00
Ryan Liptak
f46008c1d8 Fix Dir.statFile for WASI when linking libc
`statFile` now only uses `os.fstatatWasi` when not linking libc, matching the pattern used throughout other `Dir` functions. This fixes the compilation error: `error: struct 'c.wasi.Stat' has no member named 'fromFilestat'` (which the added test would have failed with)
2023-08-31 14:07:15 -07:00
Jakub Konka
43adfd9689 macho: check if fallback libSystem.{d}.tbd exists in Zig's installation 2023-08-31 22:04:24 +02:00
Jakub Konka
f4c9e19bc3
Merge pull request #17020 from ziglang/macho-versions
macho: big-ish refactor and report errors to the user using Zig's API
2023-08-31 07:50:29 +02:00
Jacob Young
e2ff486de5 Sema: cleanup coerceExtra
* remove unreachable code
 * remove already handled cases
 * avoid `InternPool.getCoerced`
 * add some undef checks
 * error when converting undef int to float

Closes #16987
2023-08-30 16:50:30 -04:00
Jakub Konka
19a1332ca1 macho: improve formatting of invalid targets in libraries 2023-08-30 22:30:42 +02:00
Jakub Konka
a7240f0c99 macho: remove error.UnhandledDwFormValue from link.File
Eventually, we will validate DWARF info upfront and report errors
to the user but this will require a rewrite of several parts of
the linker so leaving as a TODO for the near future.
2023-08-30 22:29:27 +02:00
Jakub Konka
ebe371b757 macho: report basic __eh_frame problems as errors 2023-08-30 21:48:24 +02:00
Jakub Konka
ba710ec09d macho: remove obsolete error.FailedToResolveRelocationTarget 2023-08-30 20:34:16 +02:00
Jakub Konka
5144132320 macho: report formatted error for unhandled symbol types 2023-08-30 20:16:37 +02:00
Jakub Konka
5806e761bb macho: improve error reporting for re-exports mismatch 2023-08-30 19:02:25 +02:00
Jakub Konka
22c81740ef macho: convert error.TODOImplementWritingStaticLibFiles into an actual error 2023-08-30 12:37:05 +02:00
Jakub Konka
f21245f5e7 macho: refactor resolving and parsing dependent dylibs 2023-08-30 12:30:17 +02:00
Jakub Konka
ea9f2513a3 macho: format parse error for fat libs to include CPU archs only 2023-08-29 22:26:58 +02:00
Jakub Konka
7e167537c0 macho: simplify handling and reporting parsing errors 2023-08-29 22:16:48 +02:00
Andrew Kelley
49075d2055
Merge pull request #16969 from jacobly0/no-clear-ref-trace
Sema: refactor to use fewer catch expressions
2023-08-29 16:13:39 -04:00
Igor Sadikov
4635179857 Optimize std.base64.standard.Encoder.encode 2023-08-29 16:00:31 -04:00
Jakub Konka
79b3285aa2 macho: handle mismatched and missing platform errors 2023-08-29 15:27:44 +02:00
Jakub Konka
1cae41bbbb macho: clean up array of supported platforms and versions 2023-08-29 12:14:57 +02:00
Jakub Konka
1b01715a73 link: remove unused darwin_sdk_version field 2023-08-29 12:02:58 +02:00
Jakub Konka
3ece3f83f3 macho: clean up helpers for std.SemanticVersion <-> Apple version formatting 2023-08-29 12:00:25 +02:00
Jakub Konka
2e28ab153c macho: parse platform info from each object file into Platform struct 2023-08-29 11:45:03 +02:00
Jakub Konka
ec03619dcf macho: make MachO.requiresCodeSignature accept link.Options 2023-08-29 11:40:20 +02:00
Jakub Konka
052984c5ae macho: remove MachO.requiresThunks as it is obsolete 2023-08-29 11:40:20 +02:00
Jakub Konka
2473ccc335 macho: create an explicit error set for parse functions 2023-08-29 11:40:20 +02:00