22529 Commits

Author SHA1 Message Date
Der Teufel
e6cab917e1 autodoc: added support for tuple structs 2023-01-25 15:34:04 +01:00
Jakub Konka
a95d58caf2 self-hosted: rename codegen Result.appended to Result.ok 2023-01-25 10:28:18 +01:00
Jakub Konka
4983da40d0 self-hosted: remove unused externally_managed prong for Decls code 2023-01-25 10:10:50 +01:00
Jakub Konka
e675af0698 elf+macho: append null to DWARF strtab to avoid overlapping sects
Otherwise, we were risking having strtab zero-sized and overlap
with another section.
2023-01-25 09:58:13 +01:00
Andrew Kelley
d703270545 zig build system: add LibExeObjStep.installLibraryHeaders
This function is needed when a library exposes one of its own library
dependency's headers as part of its own public API.

Also, improve error message when a file system error occurs during
install file step.
2023-01-25 02:45:57 -05:00
Andrew Kelley
3ff1f346b0 CI: give aarch64-linux-debug a little more time 2023-01-24 20:32:29 -07:00
Andrew Kelley
cb9d00e1af
Merge pull request #14402 from kcbanner/cbe_x86_fixes
CBE: x86 support and MSVC ABI fixes
2023-01-24 17:53:54 -05:00
Andrew Kelley
92ea7bce5d std.compress.xz: fix compile error on 32-bit systems 2023-01-24 15:24:19 -07:00
Andrew Kelley
d94613c1d0 support xz compressed tarballs in the package manager
This includes a breaking change:

std.compress.gzip.GzipStream renamed to
std.compress.gzip.Decompress

This follows the same naming convention as std.compress.xz so that the
stream type can be passed as a comptime parameter.
2023-01-24 15:24:19 -07:00
Andrew Kelley
ea9ded8758 std.compress.xz public API cleanup
* add xz to std.compress
 * prefer importing std.zig by file name, to reduce reliance on the
   standard library being a special case.
 * extract some types from inside generic functions. These types are the
   same regardless of the generic parameters.
 * expose some more types in the std.compress.xz namespace.
 * rename xz.stream to xz.decompress
 * rename check.Kind to Check
 * use std.leb for LEB instead of a redundant implementation
2023-01-24 15:24:19 -07:00
fn ⌃ ⌥
06ce15e8f7 Add an xz decoder to the standard library 2023-01-24 15:24:04 -07:00
David Gonzalez Martin
dfcedfdca0 build: Fix red zone flag 2023-01-24 15:41:30 -05:00
Isaac Freund
9eeae556cc std: remove meta.assumeSentinel
All but 3 callsites of this function in the standard library and
compiler were unnecessary and were removed in faf2fd18.

In this commit, the remaining 3 callsites are removed. One of them
turned out to also be unnecessary and has been replaced by slicing
directly with the length..

The 2 remaining callsites were in the very pointer-math heavy
std/os/linux/vdso.zig code which should perhaps be refactored to better
utilize slices. These 2 callsites are replaced with a plain
@ptrCast([*:0]u8, ptr) though could likely use std.mem.sliceTo() if the
surrounding code was refactored.
2023-01-24 15:39:52 -05:00
Loris Cro
4e80253e20
Merge pull request #14395 from der-teufel-programming/master
autodoc: Add Struct, Union, Enum handling in exprName, add tags for Enum and Union, anonymous types "work"
2023-01-24 19:18:52 +01:00
Der Teufel
dd8e16b906 autodoc: Add tag handling to enums and unions. Add support for Struct, Enum, Union types in exprName.
Anonymous types now work via a hack to ast_nodes.
2023-01-24 19:07:25 +01:00
Der Teufel
da68e7f0cb autodoc: add html tags to "null" 2023-01-24 19:07:25 +01:00
Loris Cro
af820bbb94 autodoc: init support for guides 2023-01-24 18:56:35 +01:00
kcbanner
5d46addd25 compiler_rt: re-enable divxf3 test on windows/llvm 2023-01-24 13:06:59 +02:00
kcbanner
4f6fdd67dd debug: re-enable resource management test on x86_64 windows 2023-01-24 12:41:19 +02:00
David Gonzalez Martin
59d9afcb5c [UEFI] Delete unnecessary padding and fix number_of_pages type 2023-01-23 21:05:38 -05:00
Andrew Kelley
ac28bedbee
Merge pull request #14418 from ifreund/assume-sentinel-sux
std: eliminate pointless meta.assumeSentinel() usage
2023-01-23 21:01:54 -05:00
Andrew Kelley
bbfbb7b22f move CONTRIBUTING.md to the wiki
closes #14427
2023-01-23 16:55:54 -07:00
kcbanner
4888f9d7e1 ci: don't run the -msvc cbe tests with the zig test runner 2023-01-23 18:43:56 -05:00
Manlio Perillo
81035b7eb3 langref: remove extra curly bracket in the CSS
In commit 3542dbf0ea5 (langref: add section numbers) I accidentally
added an extra closing curly bracket at the end of the style element.

Sorry for not validating the HTML file before creating the PR.
2023-01-23 15:51:17 -05:00
kcbanner
c7a9c28310 update zig1.wasm 2023-01-23 13:48:37 -05:00
kcbanner
31228e4f84 ci: fixup incorrect paths 2023-01-23 13:48:37 -05:00
kcbanner
8dd0107255 zig fmt fixup 2023-01-23 13:48:37 -05:00
kcbanner
d162ebfa35 ci: update windows debug ci as well 2023-01-23 13:48:37 -05:00
kcbanner
98768a9921 ci: explicitly test the CBE tests with the -msvc abi, as this is the path users will use when bootstrapping 2023-01-23 13:48:37 -05:00
kcbanner
77084093d8 cbe: handle building for -msvc using clang and -gnu using msvc 2023-01-23 13:48:37 -05:00
kcbanner
4a330ab811 target: use 16 byte alignment for 128-bit types on x86 and ofmt .c 2023-01-23 13:48:37 -05:00
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