11397 Commits

Author SHA1 Message Date
Andrew Kelley 0c90ccc297 Release 0.7.0 0.7.0 2020-11-08 12:02:09 -07:00
joachimschmidt557 03ae77b8b0 stage2 ARM: miscellaneous improvements 2020-11-07 17:27:23 +01:00
Alexandros Naskos 5430642fa0 Merge pull request #7008 from xackus/minor-fixes
change debug.assert to testing.expect in tests
2020-11-07 11:34:51 +02:00
Andrew Kelley 67ea47babd Revert "update runtime safety test case - unsigned-signed vector cast"
This reverts commit 663f0b399c.

The behavior appears to be inconsistent between running locally and on
the CI.

I suspect it could be based on what vector CPU features are available.
2020-11-06 18:58:10 -07:00
Andrew Kelley 663f0b399c update runtime safety test case - unsigned-signed vector cast
now it returns "integer cast truncated bits" instead of "attempt to cast
negative value to unsigned integer" which I think is correct.
2020-11-06 17:15:05 -07:00
Andrew Kelley ceaa569bfa disable flaky file locking test on Windows
See #7010
2020-11-06 17:00:51 -07:00
Andrew Kelley c923f74fc9 std.ResetEvent: disable flaky test on macOS
See #7009
2020-11-06 16:46:30 -07:00
xackus c9fa57541b remove outdated comment 2020-11-06 22:58:58 +01:00
xackus 5c8f7f81cd change debug.assert to testing.expect in tests 2020-11-06 22:48:54 +01:00
Andrew Kelley e5fab3ba68 update musl sources to 1.2.1 2020-11-06 14:13:57 -07:00
Andrew Kelley dba94f453a update musl headers to 1.2.1 2020-11-06 13:53:47 -07:00
Andrew Kelley 008dd90f1f update process_headers tool 2020-11-06 13:51:33 -07:00
Jay Petacat 030f00391a std: Introduce SemanticVersion data structure
This will parse, format, and compare version strings following the
SemVer 2 specification. See: https://semver.org

Updates #6466
2020-11-06 15:07:48 -05:00
Andrew Kelley d1b1f053b0 Merge pull request #6941 from LemonBoy/floateqapprox
std: Implement more useful approxEq semantics
2020-11-06 14:09:31 -05:00
LemonBoy b9391c9564 std: Make file locking tests less fragile 2020-11-06 14:02:11 -05:00
Jeremy Huffman 9f1639a6bb Fix std.ResetEvent.timedWait on darwin/macOS. (#6914) 2020-11-06 14:01:52 -05:00
Andrew Kelley a9e09a8be4 Merge pull request #6990 from kubkon/system-linker-hack
Re-enable system linker hack
2020-11-06 13:22:03 -05:00
Alexandros Naskos a1a16a941e Merge pull request #7001 from Vexu/translate-c
Translate-c: fix macro functions with no arguments
2020-11-06 19:22:56 +02:00
Jakub Konka ab69b89d52 Address review comments 2020-11-06 11:57:53 +01:00
Vexu 79549e0ac1 translate-c: fix macro functions with no arguments 2020-11-06 12:48:52 +02:00
Jakub Konka b7c3ebcb9e Rely on ZIG_SYSTEM_LINKER_HACK instead of input flags 2020-11-06 11:34:51 +01:00
Andrew Kelley c9551652b0 Merge pull request #6978 from LemonBoy/statshit
Decouple kernel and libc stat definitions
2020-11-05 17:27:22 -05:00
Andrew Kelley cf7505da1f Merge pull request #6974 from daurnimator/prctl-cleanup
prctl improvements
2020-11-05 17:25:24 -05:00
LemonBoy 78840c4ab2 stage1: Make sure union(enum(T)) is valid
The T type should be wide enough to fit values in the  0...num field
range.

Closes #6988
2020-11-05 17:24:04 -05:00
Andrew Kelley f85d719952 Merge pull request #6895 from jorangreef/fallocate
linux: add fallocate()
2020-11-05 17:23:00 -05:00
Frank Denis e7b60b219b std/crypto: don't constrain Gimli hash output to a fixed length
As documented in the comment right above the finalization function,
Gimli can be used as a XOF, i.e. the output doesn't have a fixed
length.

So, allow it to be used that way, just like BLAKE3.
2020-11-05 17:21:19 -05:00
Frank Denis 2e354c387e math.shl/math.shr: add support for vectors 2020-11-05 17:20:54 -05:00
Frank Denis 73aef46f7d std.crypto: namespace constructions a bit more
With the simple rule that whenever we have or will have 2 similar
functions, they should be in their own namespace.

Some of these new namespaces currently contain a single function.

This is to prepare for reduced-round versions that are likely to
be added later.
2020-11-05 17:20:25 -05:00
Frank Denis 4417206230 Now that they support vectors, use math.rot{l,r} 2020-11-05 17:19:48 -05:00
Andrew Kelley 34502b9c4d Merge pull request #6991 from alexnask/upgrade_mingw-w64
Upgrade mingw-w64 to version 8.0.0
2020-11-05 17:18:01 -05:00
Alexandros Naskos 3e1639c53b Fixed mingw-w64 8.0.0 compilation
Reaplied mingw-w64 header patch
2020-11-05 20:04:25 +02:00
Jakub Konka e0e3ceac19 Re-enable system linker hack
It is now possible to force linking with system linker `ld` instead
of the LLVM `lld` linker when building natively on the target. This
can be done at each stage by specifying `--system-linker-hack` flag,
and can be useful on platforms where `lld` fails to operate properly
such as macOS 11 Big Sur on ARM64 where every binary/dylib is expected
to be codesigned.

Some example invocations for each stage of compilation of Zig
toolchain:

```
cmake .. -DCMAKE_PREFIX_PATH=/path/to/llvm -DSYSTEM_LINKER_HACK=1
```

```
build/zig build test --system-linker-hack
```

```
build/zig build --prefix $(pwd)/stage2 -Denable-llvm
--system-linker-hack
```

```
build/zig build-exe hello.zig --system-linker-hack
```
2020-11-05 18:35:51 +01:00
Alexandros Naskos 708962d51e Updated mingw-w64 to version 8.0.0 2020-11-05 18:59:36 +02:00
LemonBoy ff14451b4a std: Implement more useful approxEq semantics
Comparisons with absolute epsilons are usually useful when comparing
numbers to zero, for non-zero numbers it's advised to switch to relative
epsilons instead to obtain meaningful results (check [1] for more
details).

The new API introduces approxEqAbs and approxEqRel, where the former
aliases and deprecated the old `approxEq`, allowing the user to pick the
right tool for the job.

The documentation is meant to guide the user in the choice of the
correct alternative.

[1] https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
2020-11-05 16:08:49 +01:00
LemonBoy cca6b11138 Label WASI stat as kernel_stat
We're using WASI syscalls, it makes sense to put the kernel_ prefix.
2020-11-05 12:44:43 +01:00
LemonBoy 0e95fa455c std: Split kernel&libc definitions of stat struct
There's no guarantee for the kernel definition to be ABI compatible with
the libc one (and vice versa).
There's also no guarantee of ABI compatibility between musl/glibc.

Fun, isn't it?
2020-11-05 09:38:50 +01:00
Alexandros Naskos 17837affd2 Merge pull request #6982 from Rageoholic/master
Fix CoInitializeEx so it can take a null pointer
2020-11-05 09:00:03 +02:00
rageoholic e5100605e9 Add missing LONG_PTR type 2020-11-04 18:30:48 -06:00
rageoholic 04267fb1ba Fix CoInitializeEx so it can take a null pointer 2020-11-04 16:53:05 -06:00
Frank Denis bb14bd35bd Update wasmtime to version 0.20
The version we were using in CI is now getting quite old, and we
want to make sure that the code we produce is compatible with
current versions of Wasmtime.
2020-11-04 20:28:54 +01:00
LemonBoy 346a686b9d std: Correct stack_t definition for mips 2020-11-04 15:55:06 +01:00
LemonBoy f313c88428 std: Fix pipe syscall stub for sparc64 2020-11-04 15:54:38 +01:00
daurnimator b42ffbe9e8 std: use PR enum as only location of opcode numbers 2020-11-04 22:39:35 +11:00
daurnimator b90fb1e96b std: add PR enum for the prctl opcode 2020-11-04 22:32:57 +11:00
daurnimator 02252f3f07 std: workaround #280 in prctl 2020-11-04 22:23:59 +11:00
Frank Denis 342ba960f7 sparc64 has a 8Kb page size 2020-11-03 17:29:20 -05:00
Andrew Kelley ede41759be std.fs.File.writeFileAll: support unseekable files
With this commit, the function tries to use more efficient syscalls, and
then falls back to non-positional reads.

The motivating use case for this change is to support something like the
following:

try io.getStdOut().writeFileAll(dest_file, .{});
2020-11-03 15:25:43 -07:00
Frank Denis 37bc6ee54a std.meta: test that const and mut variables have different addresses
We are checking that two identical, constant values, are stored at
different addresses.

But sharing a unique location doesn't look like something the compiler
wouldn't do.

It may make more sense to check that a const variable and a mutable
variable set to the same value have different addresses.
2020-11-03 16:52:51 -05:00
Andrew Kelley f2cb63c2e1 Merge pull request #6956 from jedisct1/more-gimli-be-fixes
Another big-endian fix for Gimli
2020-11-03 11:22:54 -05:00
Jakub Konka 5060497174 Merge pull request #6921 from xackus/gimmeMoreOfThoseSweetSweetFileDescriptors
stage2: ask for more file descriptors
2020-11-03 10:07:39 +01:00