Tadeo Kondrak
2962be8135
stage1: fix @Type(.Union) not resolving its tag type
...
Fixes https://github.com/ziglang/zig/issues/6339
2020-09-16 20:34:01 +03:00
Joran Dirk Greef
6f09796ff2
Add short license and copyright notice
2020-09-16 18:51:21 +02:00
Joran Dirk Greef
b340bbfc1d
std: add io_uring library
...
This brings io_uring helper methods to Zig for kernels >= 5.4.
We follow liburing's design decisions so that anyone who is comfortable with
liburing (https://unixism.net/loti/ref-liburing/index.html ) will feel at home.
Thanks to @daurnimator for the first draft.
Refs: https://github.com/ziglang/zig/pull/3083
Signed-off-by: Joran Dirk Greef <joran@coil.com >
2020-09-16 15:07:13 +02:00
LemonBoy
bb9a4ad6e9
std: Fix {*} printing of non-pointer types
...
Fixes a regression introduced in #6246 .
Adds a test to make sure this won't happen again.
2020-09-16 13:45:54 +02:00
Andrew Kelley
95941c4e70
stage2: building glibc shared objects
...
* caching system: use 16 bytes siphash final(), there was a bug in the
std lib that wasn't catching undefined values for 18 bytes. fixed in
master branch.
* fix caching system unit test logic to not cause error.TextBusy on windows
* port the logic from stage1 for building glibc shared objects
* add is_native_os to the base cache hash
* fix incorrectly freeing crt_files key (which is always a reference to
global static constant data)
* fix 2 use-after-free in loading glibc metadata
* fix memory leak in buildCRTFile (errdefer instead of defer on arena)
2020-09-16 03:02:46 -07:00
Andrew Kelley
281fc10ec5
std.crypto siphash: fix assertion on the size of output buffer
...
the logic was backwards
2020-09-16 02:24:36 -07:00
Nathan Michaels
7801a6d17f
Fix a typo.
2020-09-15 22:49:53 -04:00
Andrew Kelley
da0fde59b6
stage2: update to new LibCInstallation API
2020-09-15 18:08:52 -07:00
Andrew Kelley
16bd0c63b4
Merge remote-tracking branch 'origin/master' into stage2-zig-cc
...
Pulling in the changes to libc_installation.zig
2020-09-15 18:04:37 -07:00
Andrew Kelley
99a2fc2cde
stage2: implement .d file parsing for C objects
2020-09-15 18:02:42 -07:00
Rocknest
c35703825f
Add an error set
2020-09-16 01:58:48 +03:00
Andrew Kelley
a0b43ff3b3
stage2: eliminate one failure path in building c object
2020-09-15 15:24:34 -07:00
Andrew Kelley
f82b1831f7
std: handle sharing violation when deleting a file on windows
2020-09-15 15:24:13 -07:00
Andrew Kelley
7ccfb08a93
ci: update the on_master_success secret to lavatech
2020-09-15 15:08:35 -07:00
Samrat Man Singh
ca85e367f4
Use std.log in LibcInstallation parse instead of taking stderr
2020-09-15 18:03:55 -04:00
Andrew Kelley
c803d334d0
update the zen of zig
2020-09-15 13:40:01 -07:00
Andrew Kelley
b2860aa3e4
stage2: add missing import to libc_installation.zig
2020-09-15 12:52:58 -07:00
Andrew Kelley
b3cc36857e
Merge pull request #6340 from Vexu/fix
...
Fixes
2020-09-15 14:28:16 -04:00
LemonBoy
c1c3212500
std: Fix typo in ELF section header iterator
...
The code accidentally used the phdr offset instead of the shdr one while
iterating over the section headers.
Fixes #6338
2020-09-15 18:14:06 +03:00
Andrew Kelley
1da9e0fcaf
stage2: building glibc libc_nonshared.a CRT file
2020-09-15 00:41:02 -07:00
Andrew Kelley
4fa8cc7369
stage2: don't depend on windows SDK C++ code when unavailable
2020-09-15 00:40:33 -07:00
Andrew Kelley
6e9396e32b
integrate target features into building assembly code
...
This brings us up to par from what stage1 does. There will still be an
open issue for completing this.
2020-09-14 23:03:13 -07:00
Andrew Kelley
1ad60c4386
integrate target features into building C source files
2020-09-14 22:57:08 -07:00
Andrew Kelley
5d8fec3d4c
Merge remote-tracking branch 'origin/master' into stage2-zig-cc
2020-09-14 21:57:01 -07:00
Andrew Kelley
6acd903a95
stage2: support for machine code model CLI
2020-09-14 21:22:11 -07:00
Andrew Kelley
5e39ab4600
ci: disable some freebsd tests to save time
2020-09-14 21:11:34 -07:00
Andrew Kelley
0e94530c51
stage2: refactor 2 CObject fields to use CSourceFile
2020-09-14 19:52:36 -07:00
Andrew Kelley
29d9743f9d
Revert "disable sourcehut freebsd CI checks"
...
This reverts commit 40cb712d13 .
Thanks to Ava & Luna of Lavatech, we don't need to resort to this, they
have graciously given zig a SourceHut instance to use that gives us 8GB
RAM.
2020-09-14 19:43:26 -07:00
Andrew Kelley
a8ae324130
Merge branch 'ci-freebsd'
...
Thanks to Ave & Luna for providing this service that lets us have enough
ram to properly test FreeBSD.
2020-09-14 19:38:36 -07:00
Andrew Kelley
44ef270de1
ci: use hut.lavatech.top for updating the download page
2020-09-14 19:37:59 -07:00
Andrew Kelley
558e22b2d0
ci: update freebsd to use hut.lavatech.top instead of sr.ht
2020-09-14 18:45:30 -07:00
Andrew Kelley
01c24c4509
ci: enable std lib tests for freebsd
2020-09-14 18:22:16 -07:00
Andrew Kelley
dffdb2844e
track all TODO comments in BRANCH_TODO file
...
Before merging, do this for every item in the file:
* solve the issue, or
* convert the task to a github issue and update the comment
to link to the issue (and remove "TODO" text from the comment).
Then delete the file.
Related: #363
2020-09-14 18:06:19 -07:00
Andrew Kelley
26798018b7
stage2: implement writing archive files
2020-09-14 15:28:09 -07:00
Vexu
a3624e94f8
translate-c: determine sizeof using std.meta.sizeof
2020-09-14 23:53:38 +03:00
Vexu
29fd0c6d61
fix meta.cast behavior; add exhaustive tests
2020-09-14 23:21:26 +03:00
Andrew Kelley
40cb712d13
disable sourcehut freebsd CI checks
...
Drew won't give us enough RAM for stage1 to build stage2. We'll still
have freebsd builds available on releases but we're going to lose
freebsd CI testing for master branch builds until we fully switch over
to stage2 (and have lower memory usage).
Let me know if anyone wants to run a SourceHut instance and give zig
access to run on slightly more powerful machines. We need about 8 GiB
RAM to run the CI test suite for now.
After we're fully self hosted I expect to re-enable this.
2020-09-14 11:10:38 -07:00
Andrew Kelley
778bb4bc9c
move std.cache_hash from std to stage2
...
The API is pretty specific to the implementationt details of the
self-hosted compiler. I don't want to have to independently support
and maintain this as part of the standard library, and be obligated
to not make breaking changes to it with changes to the implementation of
stage2.
2020-09-14 11:05:51 -07:00
Andrew Kelley
04f6a26955
fix stage1 regressions in this branch
...
also prepare for supporting linking into archives
2020-09-14 10:42:29 -07:00
Andrew Kelley
c58e9951ef
revert bogus enum keywords in zig_llvm.h
2020-09-14 10:31:34 -07:00
Veikka Tuominen
d073836894
Merge pull request #6172 from tadeokondrak/@Type(.Union)
...
Implement @Type for Union
2020-09-14 16:43:49 +03:00
Andrew Kelley
c49435f76b
Merge pull request #6331 from mattnite/bpf-helper-defs
...
BPF: helper definitions
2020-09-14 04:00:00 -04:00
Andrew Kelley
f2e380380e
stage2: building glibc Scrt1.o
2020-09-14 00:24:03 -07:00
Andrew Kelley
060c91b97f
stage2: namespace cache dir with C source path
...
This is not strictly necessary but it increases the likelihood of cache
hits because foo.c and bar.c now will have different cache directories
and can be updated independently without clobbering each other's cache
data.
2020-09-13 23:28:28 -07:00
Andrew Kelley
0379d7b431
stage2: don't bother building glibc when only doing build-obj
2020-09-13 23:04:15 -07:00
Andrew Kelley
e5aef96293
stage2: CRT files retain locks on the build artifacts
2020-09-13 22:54:16 -07:00
Andrew Kelley
97ea5da18d
stage2: fix bad include path for glibc abi-note.S
2020-09-13 22:38:50 -07:00
Andrew Kelley
2627778b25
stage2: don't create empty object files when no zig source
2020-09-13 22:15:03 -07:00
Andrew Kelley
046dce9cef
stage2: fix not creating cache o dir before writing to it
...
also remove non-working debug CLI options
2020-09-13 21:13:24 -07:00
Andrew Kelley
2456df5f4e
stage2: rename ZigModule to Module
2020-09-13 19:56:35 -07:00