Commit Graph

22498 Commits

Author SHA1 Message Date
kcbanner
0d249e558a cbe: fixup handling of c_longdouble for msvc abi 2023-01-23 13:48:36 -05:00
kcbanner
a7209e7d12 cbe: fixup zig_export for x86 2023-01-23 13:48:36 -05:00
kcbanner
b22b84de9d cbe: fixup x86 atomics
- add zig_msvc_atomic_barrier()
- fix zig_msvc_atomic_load_p32
2023-01-23 13:48:36 -05:00
kcbanner
1aa2c32055 cbe: fixes for x86
- Emit calling convention
- Fix .Naked handling for msvc
- Add teb helper for x86
- Fix 128-bit shl implementation when rhs is >= 64
- Add 128-bit shl tests
2023-01-23 13:48:36 -05:00
Isaac Freund
186e805838
std.net.Address: clarify unix socket getOsSockLen 2023-01-23 14:49:06 +01:00
Manlio Perillo
ce6de2df82 docgen: make the name required in the Code node
Update the genToc funtion to make the name required in the Code node,
and add an additional optional field for the expected error, to use with
test_err, test_safety and obj_err.

Update langref.html.in to ensure all code blocks have a name that

  - is unique, so that a doctest can be identified by it
  - is descriptive

For test, test_err and test_safefy, ensure that the doctest name starts
with "test_", excluding doctests in the "Zig Test" section and doctests
that are imported by other doctests.

Ensure that the indentation of code_begin and code_end blocks are
consistent.

Fix a typo in pointer_arthemtic.
2023-01-23 15:14:24 +02:00
Veikka Tuominen
220020599c
Merge pull request #13670 from mlugg/fix/astgen-ambiguous-package
AstGen: detect and error on files included in multiple packages
2023-01-23 14:25:42 +02:00
Isaac Freund
faf2fd18d3
std: eliminate pointless meta.assumeSentinel() usage
This fixes a bug in std.net caused during the introduction of
meta.assumeSentinel due to the unfortunate semantics of mem.span()

This leaves only 3 remaining uses of meta.assumeSentinel() in the
standard library, each of which could be a simple @ptrCast([*:0]T, foo)
instead. I think this function should likely be removed.
2023-01-23 12:19:53 +01:00
Andrew Kelley
d395127552
Merge pull request #14389 from ziglang/ci-macos-debug
CI: additionally test x86_64-macos with a debug build of the zig compiler
2023-01-23 02:08:18 -05:00
Manlio Perillo
05c7f7abf1 build: fix incorrect name in InstallArtifactStep
Rename the full_pdb_path variable to full_h_path, in the
InstallArtifactStep.make method.
2023-01-23 02:07:37 -05:00
Jan Philipp Hafer
55e879d2ed std.os.windows: add possible error NETNAME_DELETED of ReadFile
Closes #13631
2023-01-23 02:07:12 -05:00
Andrew Kelley
3cb1ab0e05 langref: point 0.10.0 nav link to 0.10.1 2023-01-22 18:19:26 -07:00
Mateusz Poliwczak
bbbc4ebf03 support P256 in x509 2023-01-22 17:24:45 -05:00
Andrew Kelley
4592ee77c0 update CI tarball for macos
This includes the commit for -Wno-overriding-t-option
2023-01-22 15:00:53 -07:00
Andrew Kelley
4133bbd67e
Merge pull request #14396 from FnControlOption/crc
std.hash.crc: implement algorithms listed in CRC RevEng catalog
2023-01-22 16:04:03 -05:00
Andrew Kelley
8484df5bd2 zig cc: add -Wno-overriding-t-option to clang on darwin
This avoids a warning that sometimes occurs when providing both a
-target argument that contains a version as well as the
-mmacosx-version-min argument. Zig provides the correct value in both
places, so it doesn't matter which one gets overridden.
2023-01-22 12:27:18 -07:00
Andrew Kelley
3df4707ea7 CI: also test x86_64-macos with a debug zig compiler 2023-01-22 12:14:25 -07:00
mlugg
5f9186d0ce
AstGen: detect and error on files included in multiple packages
Previously, if a source file was referenced from multiple packages, it
just became owned by the first one AstGen happened to reach; this was a
problem, because it could lead to inconsistent behaviour in the compiler
based on a race condition. This could be fixed by just analyzing such
files multiple times - however, it was pointed out by Andrew that it
might make more sense to enforce files being part of at most a single
package. Having a file in multiple packages would not only impact
compile times (due to Sema having to run multiple times on potentially a
lot of code) but is also a confusing anti-pattern which more often than
not is a mistake on the part of the user.

Resolves: #13662
2023-01-22 19:00:03 +00:00
mlugg
6d71d79dc2
Package: store package name directly
By @Vexu's suggestion, since fetching the name from the parent package
is error-prone and complex, and optimising Package for size isn't really
a priority.
2023-01-22 19:00:03 +00:00
fn ⌃ ⌥
33682a29c6 Rewrite update_crc_catalog in zig and move tests to separate file 2023-01-22 07:16:49 -08:00
fn ⌃ ⌥
6089ed9ee7 Merge branch 'master' into crc 2023-01-22 05:30:38 -08:00
joachimschmidt557
c0284e242f stage2 ARM: add basic debug info for locals
Also disables one behavior test which was failing
2023-01-22 12:00:04 +01:00
Andrew Kelley
a51c76541d
Merge pull request #14403 from Vexu/fixes
Misc fixes
2023-01-22 00:36:50 -05:00
fn ⌃ ⌥
f85c01d4c7 Implement gzip header CRC check.
From RFC 1952:

> If FHCRC is set, a CRC16 for the gzip header is present,
> immediately before the compressed data. The CRC16 consists
> of the two least significant bytes of the CRC32 for all
> bytes of the gzip header up to and not including the CRC16.
2023-01-22 00:33:29 -05:00
Jakub Konka
562d52e23d
Merge pull request #14397 from ziglang/macho-unwind-info
zld: handle parsing and synthesising unwind info in the MachO linker
2023-01-22 00:44:44 +01:00
Veikka Tuominen
aa626deadd llvm: implement explicit Win64 and SysV calling conventions 2023-01-22 01:04:20 +02:00
Veikka Tuominen
a28fbf3132 Sema: fix error message for bad pointer arithmetic
Closes #14388
2023-01-22 01:04:20 +02:00
Veikka Tuominen
1f475de852 Sema: fix unwrapping null when reporting error on member access
Closes #14399
2023-01-22 01:04:20 +02:00
Veikka Tuominen
5259d11e3b Sema: resolve fields before checking tuple len
Closes #14400
2023-01-22 00:12:37 +02:00
Veikka Tuominen
5f5ab49168 Value: implement compareAllWithZero for bytes and str_lit
Closes #10692
2023-01-22 00:12:37 +02:00
Veikka Tuominen
a492a607d5 type: correct condition for eliding pointer alignment canonicalization
Closes #14373
2023-01-22 00:12:37 +02:00
Veikka Tuominen
d284c00fda Sema: handle lazy values in more places
* resolve lazy values in anon structs being passed to anytype params
* use `resolveMaybeUndefValIntable` where appropriate

Closes #14356
2023-01-22 00:12:36 +02:00
Stephen Gregoratto
7f635ae7bd FreeBSD: add mcontext_t for aarch64
What isn't disabled for test-std mostly passes, except for the copysign
and signbit tests for f16. Seemingly related to #14366.
2023-01-21 23:20:50 +02:00
Jakub Konka
241cabdf3d link-tests: do not expect __eh_frame section on x86_64-macos 2023-01-21 19:14:44 +01:00
Jakub Konka
6fd1d7b372 zld: fix 32bit build 2023-01-21 17:17:34 +01:00
Jakub Konka
983e373409 macho: fix sorting symbols by seniority 2023-01-21 16:53:46 +01:00
fn ⌃ ⌥
be4468be37 std.hash.crc: implement algorithms listed in CRC RevEng catalog 2023-01-21 07:04:09 -08:00
Jakub Konka
02db9933a4 macho: properly relocate target symbol address in __eh_frame 2023-01-21 14:11:56 +01:00
Jakub Konka
3dff040ca5 macho: synthesise unwind records in absence of compact unwind section
Unlike Apple ld, we will not do any DWARF CFI parsing and simply
output DWARF type unwind records.
2023-01-21 13:37:48 +01:00
Jakub Konka
24f6c07653 std.macho: add OLD = 0 as valid mode for both arm64 and x86_64 2023-01-21 13:18:14 +01:00
Andrew Kelley
38eebf3c4d
Merge pull request #14392 from ziglang/zig-build-transitive-deps
std.build.LibExeObjStep: better handle transitive deps
2023-01-21 02:54:25 -05:00
Andrew Kelley
6d38dba72e std.build.LibExeObjStep: avoid putting static libs inside static libs 2023-01-20 19:31:38 -07:00
Andrew Kelley
7ea3937c5a std.build.LibExeObjStep: better handle transitive deps
* no longer repeat -lc on the linker line redundantly
 * when using linkLibrary() with a static library, it will now also put
   the static library's static library dependencies on the linker line,
   recursively.
 * refactor out a common pattern to an addFlag function
2023-01-20 16:58:31 -07:00
Jakub Konka
eb0c959b43 link-tests: update uuid test with new uuid values
Changes only pertain arm64 as for x86_64 turns out we are
missing one additional feature which is synthesising unwind info
from only eh frame records, or at least this is what it looks like
when I analysed the output of Apple's ld.
2023-01-20 21:27:57 +01:00
Jakub Konka
e0ccbff87d link-tests: test unwind info emitter via c++ exceptions 2023-01-20 20:57:40 +01:00
Jakub Konka
835a60a34f zld: parse, synthesise and emit unwind records 2023-01-20 18:43:16 +01:00
Jakub Konka
74b72a766d
Merge pull request #14386 from ziglang/macho-fixes
macho: fix nondeterministic failures in the macOS CI
2023-01-20 18:28:16 +01:00
Hardy
37fe41792c added test for bitcast signaled nan float
This was fixed by MR #14201

closes #10449
2023-01-20 16:42:24 +02:00
Jakub Konka
9f0cb763a4 macho: disable some log messages 2023-01-20 13:10:20 +01:00
Jakub Konka
9d2711a3d9 macho: use ArrayHashMap for tracking of dyld runtime metadata 2023-01-20 12:10:16 +01:00