daurnimator
73f3f01670
Fix json parser close tracking ( #6865 )
...
* std: fix json parsing with unmatched closing tokens
* std: fix swapped json parsing errors
2020-11-09 18:29:02 -05:00
xackus
15dbab9a0c
std: json: fix misleading endianness conversion
2020-11-09 18:27:07 -05:00
Frank Denis
427a212e38
Don't prevent compilation on platforms where debug info is unsupported
...
We don't support debug information on platforms that are not tier-1,
but it shouldn't be a hard error that completely prevents compilation.
2020-11-09 18:22:50 -05:00
Alexandros Naskos
fc67e5f843
Windows TLS startup symbols are already provided by libcrt when linking against libc
2020-11-09 17:46:46 -05:00
Jakub Konka
0bc9fd5e8e
Merge pull request #7035 from ziglang/macos-posix-headers
...
macOS libc headers: add POSIX headers
2020-11-09 23:41:55 +01:00
Andrew Kelley
83a1523b1a
std.ResetEvent: disable flaky test on Windows
...
See #7009
2020-11-09 15:33:40 -07:00
Jakub Konka
db2ac8ae49
macOS libc headers: add objc/message.h and runtime.h
2020-11-09 19:57:07 +01:00
Jakub Konka
09cc61bfe4
Add more missing libc headers used by frameworks
...
See
76f22c3905 .
2020-11-09 18:47:09 +01:00
Jakub Konka
267116d626
macOS libc headers: add mach/clock.h
...
LLVM depends on it.
2020-11-09 15:02:03 +01:00
Andrew Kelley
b0cbd0ad2d
macos libc headers: add more
...
these new files are generated by recursively including:
sysexits.h
mach/mach.h
sys/attr.h
sys/mount.h
crt_externs.h
execinfo.h
all of which are depended on by LLVM libraries.
2020-11-08 21:12:18 -08:00
Andrew Kelley
cd221b9df9
macOS libc headers: add sys/sysctl.h
...
libcxx depends on it
2020-11-08 20:26:33 -08:00
Andrew Kelley
16b7be34a1
macOS libc headers: add sys/param.h
...
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
1213e26ba8
macOS libc headers: add mach-o/dyld.h
...
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
25e78bd007
add copyfile.h
...
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
fdd775b3bf
macOS libc headers: add xlocale.h and Block.h
...
These are both included by libcxx.
2020-11-08 20:21:29 -08:00
Andrew Kelley
eed5814d75
macOS libc headers: add POSIX headers
2020-11-08 20:21:29 -08:00
Frank Denis
7f9e3e419c
Use @reduce
2020-11-07 20:30:13 +01:00
Frank Denis
bd07154242
Add mem.timingSafeEql() for constant-time array comparison
...
This is a trivial implementation that just does a or[xor] loop.
However, this pattern is used by virtually all crypto libraries and
in practice, even without assembly barriers, LLVM never turns it into
code with conditional jumps, even if one of the parameters is constant.
This has been verified to still be the case with LLVM 11.0.0.
2020-11-07 20:18:43 +01:00
Josh Holland
a1ec5448c7
make ArrayList.span into a compile error
2020-11-07 11:15:47 +00:00
Josh Holland
c25b157dda
remove deprecated uses of ArrayList.span
2020-11-07 11:15:44 +00: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
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
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
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
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
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
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
53c1624074
std: Make utf8CountCodepoints much faster
...
Make the code easier for the optimizer to work with and introduce a fast
path for ASCII sequences.
Introduce a benchmark harness to start tracking the performance of ops
on utf8.
2020-11-05 16:10:34 +01:00
LemonBoy
3a1f515e09
Address review comments
2020-11-05 16:10:34 +01:00
LemonBoy
1982e0c18a
Fix typo in documentation
2020-11-05 16:10:34 +01:00
LemonBoy
0316ac959c
Make std.formatBuf UTF-8 aware
2020-11-05 16:10:34 +01:00
LemonBoy
675de8d6b7
Clean up the unicode codepoint formatter a bit
2020-11-05 16:10:34 +01:00
LemonBoy
44533f10fe
std: Introduce std.unicode.utf8ValidCodepoint
2020-11-05 16:10:34 +01:00
LemonBoy
6c4efab106
std: Introduce std.unicode.utf8CountCodepoints
2020-11-05 16:10:33 +01:00
LemonBoy
2cce23062b
Update the API and add add error-recovery path
2020-11-05 16:10:33 +01:00