10977 Commits

Author SHA1 Message Date
Andrew Kelley
09a250c531 adjust error message of zig run with no args
previously it said "one source file" which was not correct
2020-10-15 17:44:10 -07:00
g-w1
dfce396cf8 friendly error message for zig run with no args 2020-10-15 17:43:44 -07:00
Tadeo Kondrak
e892ee17e6 std: move std.meta.refAllDecls to std.testing 2020-10-15 20:34:22 -04:00
Andrew Kelley
0da027f078 Merge branch 'g-w1-zig-test-zig-run-execve'
closes #6653
2020-10-15 17:19:47 -07:00
Andrew Kelley
43c2ce10a1 fixups
* extract logic into a `os_can_execve` and use it in the other place
   that we execve
 * outdent some code by introducing `run_or_test` variable
 * delete unnecessary and wasteful memory management logic
 * better error message for when execve fails
 * add comment to explain why we do not execve for `zig test`
2020-10-15 17:18:40 -07:00
g-w1
1c36680928 stage2: use execve where available for zig test and zig run
closes #6531
2020-10-15 16:54:50 -07:00
Andrew Kelley
e17297102a Merge branch 'kubkon-enable-stage2-macos-tests'
closes #6661
2020-10-15 16:48:44 -07:00
Andrew Kelley
d91e75f5ca getExternalExecutor fixups regarding dynamic linker
* std.Target.standardDynamicLinkerPath: macOS has a dynamic linker
 * no need to override the default dynamic linker in the macos
   CrossTarget initialization in the tests
 * in getExternalExecutor, when validating the dynamic linker path, take
   into account the standard dynamic linker path.
2020-10-15 16:44:16 -07:00
Clayton Voges
8c4031fd87 replaced inStream() with reader()
`inStream()` is now deprecated and deserves replacing.
2020-10-15 19:30:21 -04:00
Jakub Konka
0e1afee732 Enable stage2 end-to-end tests on macOS run natively
This commit enables stage2 end-to-end tests to run natively on macOS
(where and when applicable). Since QEMU on macOS doesn't support
the same type of architecture emulation as it does on linux (i.e.,
there is no `qemu-x86_64` for instance), this commit ensures that we
specify a path to dynamic linker on macOS (`/usr/lib/dyld`) which
is then checked for existence in `std.CrossTarget.getExternalExecutor()`
function, and if exists, we can run the test natively.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-15 15:59:16 -07:00
Frank Denis
f3667e8a80 std/crypto/25519: do cofactored ed25519 verification
This is slightly slower but makes our verification function compatible
with batch signatures. Which, in turn, makes blockchain people happy.
And we want to make our users happy.

Add convenience functions to substract edwards25519 points and to
clear the cofactor.
2020-10-15 18:49:10 -04:00
LemonBoy
ab585c680b stage1: Off-by-one error in int to float conversion
The base is 2^64 and not 2^64-1.

Closes #6683
2020-10-15 21:25:59 +03:00
Isaac Freund
7b150dd05e docs: snake_case enums/unions in langref examples
This follows the accepted change to the style guide:
https://github.com/ziglang/zig/issues/2101
2020-10-15 18:55:57 +03:00
Andrew Kelley
3b4432d9a6
Merge pull request #6655 from kprotty/timers
Integrate std.time.sleep with the event loop
2020-10-14 21:49:45 -04:00
Andrew Kelley
2f52f95b92
Merge pull request #6669 from ifreund/color-fixes
std/build: support --color
2020-10-14 21:35:43 -04:00
Matthew Knight
352976ed23
Event Channel: updated linked list node initialization (#6652)
fixed node init method
2020-10-14 21:33:53 -04:00
Andrew Kelley
aa5ff867a2 Merge branch 'jedisct1-tbd-dylib'
closes #6681
2020-10-14 18:24:21 -07:00
Andrew Kelley
816304e7e1 add .tbd to usage text 2020-10-14 18:22:50 -07:00
Frank Denis
c0e9d3fb86 Classify .tbd files as shared libraries
On macOS, a .tbd ("text-based dylib definition") file is a shared library
stub, allowing symbols to be defined only once for all the architectures
the library was compiled for.

.tbd files can be linked like .dylib files.
2020-10-14 18:19:57 -07:00
Andrew Kelley
477798b37e ci: macos: unset ZIG_LIBC before testing
otherwise cross compiling gets incorrectly affected by the environment
variable.
2020-10-14 17:59:29 -07:00
Andrew Kelley
540364e6c1 ci: macos: update to new cache tarball
This tarball contains LLVM, Clang, LLD, Zig, and libz.a for macOS. This
is everything we need for the CI to produce a working Zig executable.
2020-10-14 17:36:43 -07:00
Andrew Kelley
bf8cc73cf3 ci: macos: take advantage of zig-bootstrap 2020-10-14 02:25:51 -07:00
Andrew Kelley
0f4386875f stage2: support ZIG_LIBC env var and detect self as system C compiler 2020-10-14 02:05:56 -07:00
Jakub Konka
68b31c59a6
Merge pull request #6650 from kubkon/macho-incremental
stage2: enable incremental MachO linking
2020-10-14 08:20:33 +02:00
Rocknest
548fd6e87b force comptime on comptimePrint 2020-10-14 01:03:01 -04:00
Andrew Kelley
3811602ad7
Merge pull request #6643 from jedisct1/chacha-vec
std/crypto: add a vectorized ChaCha20 implementation
2020-10-14 00:52:36 -04:00
LemonBoy
0570df69b1 stage1: Fix missing runtime safety check for intToPtr
Elide the alignment check if the pointer alignment is one, the null
check must be preserved as it depends on the pointer type.

Fixes #6667
2020-10-14 00:05:50 -04:00
Isaac Freund
6ba1fdf7e0
stage2: use meta.stringToEnum for Color parsing
This requires renaming the variants to be snake_case, which is the new
recommended style anyways.
2020-10-13 20:17:30 +02:00
Isaac Freund
f01c3150c1
std/build: support --color 2020-10-13 20:06:03 +02:00
Jakub Konka
adfd298e44 Do not rewrite paths to dyld and libSystem unless changed 2020-10-13 08:38:17 +02:00
Jakub Konka
951721343f Reuse text blocks; enable all incremental tests 2020-10-13 08:38:17 +02:00
Jakub Konka
cf2aea7b41 Enable incremental testcase for macOS 2020-10-13 08:38:17 +02:00
Jakub Konka
ecd480fe93 Fix writing of load cmds headers *after* symtab update 2020-10-13 08:38:17 +02:00
Jakub Konka
fc660af077 Update allocateTextBlock to use node free list 2020-10-13 08:38:17 +02:00
Jakub Konka
78ec7b671d Add mechanism for growing/shrinking text blocks 2020-10-13 08:38:17 +02:00
Jakub Konka
0b77152faa Add local and offset free lists 2020-10-13 08:38:17 +02:00
Andrew Kelley
ea45ee5484 cmake: remove all the LLVM 10 workarounds 2020-10-12 22:35:06 -07:00
Andrew Kelley
9e05f42fee ci: macos: set the cross compile cmake option
This should avoid invoking llvm-config to work around a symbol
not found inside libstdc++, and plus it's technically more correct
anyway.
2020-10-12 22:32:14 -07:00
Andrew Kelley
92926c4331 ci: no space in vmImage I guess 2020-10-12 21:58:46 -07:00
Andrew Kelley
461792f9de ci: update to macos 10.15 image 2020-10-12 21:53:13 -07:00
Andrew Kelley
68e6da7c00 CI: enable all the freebsd tests 2020-10-12 20:51:16 -07:00
Andrew Kelley
27b04d5905 disable the failing std lib freebsd tests
enable std lib freebsd tests on the CI

See #1759
2020-10-12 20:08:23 -07:00
Andrew Kelley
74e3ffa9b4 ci: update llvm 10 => 11 2020-10-12 18:38:28 -07:00
Andrew Kelley
c19dcafa17 Merge remote-tracking branch 'origin/master' into llvm11 2020-10-12 17:57:35 -07:00
Vignesh Rajagopalan
2ab0c7391a Rename .macosx to .macos 2020-10-12 18:56:25 -04:00
kprotty
12508025a4 Add more comments & cleanup AutoResetEvent 2020-10-11 19:16:07 -05:00
kprotty
e9a4c3dd82 fix DelayQueue typos 2020-10-11 14:21:36 -05:00
kprotty
aa53f6d0b5 integrate std.time.sleep with the event loop 2020-10-11 14:18:19 -05:00
kprotty
a42c0f88e0 AutoResetEvent 2020-10-11 14:17:51 -05:00
Frank Denis
9f109ba0eb Simpler ChaCha20 vector code 2020-10-10 22:45:41 +02:00