Commit Graph

11088 Commits

Author SHA1 Message Date
Andrew Kelley
198d1438ea ci: fix regression from not building docs
0e4f7a8e3f forgot to build the docs,
causing CI failures
2020-10-22 01:18:55 -07:00
LemonBoy
0c355bef9e std: Slim down the error code path in initStaticTLS
Calling @panic made the executable ~30x times bigger, use a simple
`abort()` and let the user figure out what went wrong.

Supporting ARMv6 (and earlier?) platforms is not a priority.

Closes #6676
2020-10-21 23:35:06 -04:00
heidezomp
1e07487904 Fix std.net.connectUnixSocket in evented I/O mode
The event loop constant was missing.
2020-10-21 23:32:12 -04:00
Andrew Kelley
ce5035c07d Merge branch 'kubkon-macos-libc'
closes #6752
closes #5031
2020-10-21 19:59:12 -07:00
Andrew Kelley
11a9eff36e add another copyright notice to macos stdint.h 2020-10-21 19:58:47 -07:00
Andrew Kelley
b61733a4b8 readme: rewrite the license section 2020-10-21 19:55:35 -07:00
Jakub Konka
7d0acacfc3 Add minimal set of macOS libc headers
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-21 19:45:21 -07:00
LemonBoy
44f8e6a534 stage1: Fix edge case in Union ZigValue generation
Unions that passed the one_possible_value check were incorrectly
generated, none of their internal fields were initialized.

Fixes #6758
2020-10-21 22:42:03 -04:00
frmdstryr
52879b50d9 Update enable-valgrind flag to fvalgrind 2020-10-21 22:41:11 -04:00
Frank Denis
0e4f7a8e3f
MSVC CI: run tests individually (#6751)
This slightly reduces the amount of peak RSS needed, buying us more time until stage2 is shipping.
2020-10-21 22:40:41 -04:00
xackus
36d586336c std docs: print bool values 2020-10-20 23:27:12 +03:00
LemonBoy
90f7034b69 std: Implement featureSetHasAny/featureSetHasAll
Introduce two helper functions to avoid writing short novels only to check for more
than a single feature.
2020-10-20 23:23:43 +03:00
Rocknest
a123378141 langref: fix equations 2020-10-20 23:22:08 +03:00
John Burton
33c4ad7f3a Add missing std in dump function json.zig
Add missing std to use of std.io.getStdErr in the function dump
so that it compiles.
2020-10-20 13:39:38 +03:00
Nathan Bourgeois
3ab4d112e0 Update Documentation to use -O instead 2020-10-19 13:00:04 +03:00
Frank Denis
6ddb05d996 Darwin has arc4random(), too 2020-10-18 18:24:36 +02:00
Jakub Konka
b28992de71 Disable build.zig tests on WASI since rely on cwd()
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-18 18:20:43 +02:00
Jakub Konka
dc68aab6fb
Merge pull request #6728 from Snektron/std-build-dupePkg-fix
Fix invalid call to dupePkg in build.zig
2020-10-18 15:29:51 +02:00
Robin Voetter
3d857f7808 add addPackage test 2020-10-18 13:35:24 +02:00
Robin Voetter
29c580304b Fix invalid call to dupePkg in build.zig 2020-10-18 13:20:19 +02:00
Andrew Kelley
919dcc5104 coff: link in CRT for DLLs that want -lc
see #5748
closes #5870
2020-10-17 20:35:44 -07:00
Jesse Rudolph
e821a57683 add Builder.dupePkg()
mimics the duplication of strings in `Builder` for `Pkg`. This
ensures the lifetime of the memory backing strings in a `Pkg`
struct and the `Pkg.dependencies` slice is not shorter than the
`Builder` that the data is associated with.
2020-10-17 22:35:36 -04:00
Andrew Kelley
b0684bf084 std.mem: expose the simpler linear functions
The new defaults that came in with
644400054c are nice, however, it is still
possible that someone knows their inputs are always small and wants to
use the simpler implementations. We keep the default to make the choice
at runtime, but expose the linear functions in the public interface of
std.mem.

Also improved the doc comments.
2020-10-17 19:24:52 -07:00
Andrew Kelley
644400054c
Merge pull request #6259 from dec05eba/master
Use boyer-moore-horspool algorithm for indexOfPos and lastIndexOf unless the haystack or needle is very small
2020-10-17 21:38:50 -04:00
Nathan Bourgeois
e55244c4c6
BYOS support for system.isatty(fd: fd_t); (#6686) 2020-10-17 21:13:10 -04:00
Felix (xq) Queißner
b014bc77c8 Fixes std.meta.Tuple and std.meta.ArgsTuple for zero-sized types (like void). 2020-10-17 21:10:01 -04:00
LemonBoy
2a256d5ea0 stage1: Fix type-checking of unary neg for vector types
Validate the vector element type as done for the scalar case.

Fixes #6708
2020-10-17 21:08:39 -04:00
Andrew Kelley
e51bc19e4a
Merge pull request #6394 from Vexu/fmt
std.fmt add specifier for printing Zig identifiers
2020-10-17 21:06:54 -04:00
Andrew Kelley
71ac5b1515 Merge branch 'semarie-openbsd-minimal' 2020-10-17 17:53:47 -07:00
Andrew Kelley
05b1a7414e code cleanups
* in selfExePath, return errors instead of defaulting to bogus data
 * less invasive edits to the logic of link/Elf.zig
 * less indentation
2020-10-17 17:52:09 -07:00
Andrew Kelley
03f7cffce9 Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into semarie-openbsd-minimal 2020-10-17 17:34:43 -07:00
Andrew Kelley
9052e0b137
Merge pull request #6713 from jprudil/close-6697
Make std.meta.Int accept a signedness parameter
2020-10-17 18:55:25 -04:00
Frank Denis
fa17447090 std/crypto: make the whole APIs more consistent
- use `PascalCase` for all types. So, AES256GCM is now Aes256Gcm.
- consistently use `_length` instead of mixing `_size` and `_length` for the
constants we expose
- Use `minimum_key_length` when it represents an actual minimum length.
Otherwise, use `key_length`.
- Require output buffers (for ciphertexts, macs, hashes) to be of the right
size, not at least of that size in some functions, and the exact size elsewhere.
- Use a `_bits` suffix instead of `_length` when a size is represented as a
number of bits to avoid confusion.
- Functions returning a constant-sized slice are now defined as a slice instead
of a pointer + a runtime assertion. This is the case for most hash functions.
- Use `camelCase` for all functions instead of `snake_case`.

No functional changes, but these are breaking API changes.
2020-10-17 18:53:08 -04:00
Andrew Kelley
0011def2b2 fix compilation error when building with io_mode evented
The merge of #5613 introduced a regression when building with io_mode
evented, fixed in this commit.

closes #6715
2020-10-17 15:46:36 -07:00
Vexu
e8ca1b254d
std: remove renderStringLiteral in favor of std.fmt specifier 2020-10-17 23:20:38 +03:00
Sebastien Marie
35a7247a2c
Merge branch 'master' into openbsd-minimal 2020-10-17 17:38:23 +02:00
Jan Prudil
132813849c Convert remaining call sites 2020-10-17 14:50:26 +02:00
Jan Prudil
aadccc4206 Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
Vexu
2c294676b5
use new format specifier in translate-c and std lib 2020-10-17 10:27:19 +03:00
Vexu
8d38a91ca8
std.fmt: add specifier for Zig identifiers 2020-10-17 10:26:59 +03:00
Andrew Kelley
245d98d32d
Merge pull request #6291 from pixelherodev/cbe_arithmetic
CBE: addition and subtraction
2020-10-17 01:00:38 -04:00
Andrew Kelley
9241c1b772 Merge branch 'nmichaels-zbs-doc'
closes #5800
2020-10-16 21:33:04 -07:00
Andrew Kelley
9ca8bcb4d9 langref cleanups
* move the opaque section to after struct, enum, union, and add
   hyperlinks
 * improve the introduction of the zig build system. don't link to the
   wiki.
 * update to the latest zig init-exe example code
 * rename headers to avoid redundant words such as "zig"
 * simplify example code
2020-10-16 21:29:33 -07:00
Nathan Michaels
eb80cc2b9e Add some basic examples for the Zig Build System. 2020-10-16 21:29:22 -07:00
Andrew Kelley
6850e54cc0 Merge branch 'vegecode-byteOffsetOf_fix'
closes #5713
2020-10-16 21:25:42 -07:00
vegecode
2545f44db0 byteOffsetOf add fields to non-packet struct to maintain symmetry 2020-10-16 20:04:42 -07:00
vegecode
0456b2145d byteOffsetOf rounds up using bit offset in host integer 2020-10-16 20:04:42 -07:00
Juha Syrjälä
79ef96b6a4 Add support for zig build run -- arg1 arg1 in file created by init-exe 2020-10-16 21:29:24 -04:00
Andrew Kelley
8a2d12d707
Merge pull request #6393 from onebsv1/priority-queue-update
Adding a function to update the priority of an element
2020-10-16 21:26:04 -04:00
LemonBoy
d44486b274 std: Add libssp implementation for GNU/Windows targets
Unlike glibc and musl, MinGW provides no libssp symbols leading to
countless compile errors if FORTIFY_SOURCE is defined.

Add a (incomplete) implementation of libssp written in Zig so that
linking succeeds.

Closes #6492
2020-10-16 21:22:14 -04:00