Joris Hartog
5e40560367
Specify type in autoHash error message
...
This commit simply specifies the type which `autoHash` can't hash in the
compile error.
Closes #7970 .
2021-03-21 23:07:02 +02:00
Nuno Leiria
0d96a284e8
std: Add reset to TokenIterator
2021-03-20 22:01:09 -07:00
Jakub Konka
3913332145
Fix digest format specifier after std.fmt updates
2021-03-20 15:09:45 -07:00
Michael Dusan
e35f325dd1
azure: produce macos arm64 binaries
...
new pipeline `BuildMacOS_arm64`
- `vmImage: 'macOS-10.15' `
new `macos_arm64_script`
- switch from using `make` to `ninja`
- select xcode 12.4
- set zig-cache env variables
- build host-zig binary with xcode, link against llvm for x86_64 (target macos 10.15)
- build arm64-zig binary with xcode and host-zig, link against llvm for arm64 (target macos 11.0)
- ad-hoc codesign arm64 binary with linker
- use host-zig for docgen
- use host-zig for experimental std lib docs
- sync final `release/` hierarchy with `linux_script`
- use gnu-tar for good-practices (set owner, set sort)
enhance `CMakeLists.txt`
- do not build `zig0` when cross-compiling
- disable `BYPRODUCTS` directive `zig1.o` to avoid `ninja` error
see #8265
2021-03-20 22:50:51 +01:00
Jakub Konka
f6ba810f27
zld: apply offset for DICE in archive
2021-03-19 23:37:16 +01:00
LemonBoy
867ae506e3
std: Add syscall7 stub for Linux/MIPS
...
Some syscalls such as fadvise require an extra argument to comply with
the register pair alignment imposed by the ABI.
Wacky, isn't it?
2021-03-19 13:03:55 -07:00
Jakub Konka
652842637c
zld: continue on invalid/missing debug info
2021-03-19 20:05:02 +01:00
Jakub Konka
d1b376cac9
zld: fix parsing archive/object name from header
2021-03-19 11:06:51 +01:00
Martin Wickham
96ae451bbe
Add some enum utilities
2021-03-18 14:05:01 -07:00
Andrew Kelley
5e5b35f107
stage1: small memory optimization for simple pointer types
...
Avoid storing extra IR instruction data for simple pointer types.
2021-03-18 14:04:02 -07:00
Andrew Kelley
a6f5aa71ac
stage1: small IR memory optimization on CheckSwitchProngs
2021-03-18 14:04:02 -07:00
Veikka Tuominen
ac7217e1f5
translate-c: preserve zero fractional part in float literals
2021-03-18 22:46:00 +02:00
jacob gw
7c6eb41619
cbe tests: fix test on windows
...
"\n" -> std.cstr.line_sep
2021-03-18 22:45:01 +02:00
Andrew Kelley
5cbb642525
stage1: small mem usage improvement for IR
...
move a boolean field to be represented implicitly with the enum tag.
Just borrowing one of the many strategies of stage2.
This simple change took the peak mem usage from std lib tests on
my machine from 8.21 GiB to 8.11 GiB.
2021-03-18 13:14:26 -07:00
Jakub Konka
17c066e925
Merge pull request #8282 from kubkon/zld
...
macho: upstream zld linker
2021-03-18 19:14:17 +01:00
Evan Haas
b54514d9dd
translate-c: Use [N:0] arrays when initializer is a string literal ( #8264 )
...
* translate-c: Use [N:0] arrays when initializer is a string literal
Translate incomplete arrays as [N:0] when initialized by a string literal.
This preserves a bit more of the type information from the original C program.
Fixes #8215
2021-03-18 14:41:04 +02:00
root
75a7abb0c4
std: Fix std.fs.path.joinZ
2021-03-18 14:33:38 +02:00
Veikka Tuominen
bcc97bc1ed
Merge pull request #8247 from Ersikan/fmt-fix-encoding
...
zig fmt: fix non-UTF-8 encoding #2820
2021-03-18 14:30:11 +02:00
Jakub Konka
f3b4f79c7f
zld: temporarily disable testing shared lib linking
2021-03-18 11:10:31 +01:00
Jakub Konka
2cf1c1b96b
macho: honor verbose_link when linking with zld
2021-03-18 11:10:09 +01:00
Jakub Konka
861ea64009
macho: remove now obsolete LLD fixups
2021-03-18 11:09:47 +01:00
Dimenus
dfeca48e35
@intCast takes two args
2021-03-17 22:58:52 -07:00
Jakub Konka
7516dfff83
zld: use zld when linking aarch64 by default and cross-comp
2021-03-18 00:37:13 +01:00
Jakub Konka
900658a85d
rebase with master
2021-03-17 20:05:29 +01:00
Jakub Konka
1ec620be62
zld: fix GOT loads and indirection on x86_64
2021-03-17 19:59:57 +01:00
Jakub Konka
ac0c669473
zld: add/fix more issues
...
* fix debug info for static archives
* allow handling of empty object files
* fix some relocs for GOT loads
2021-03-17 19:59:13 +01:00
Jakub Konka
de209afbba
zld: fix TLV initializers
2021-03-17 19:59:13 +01:00
Jakub Konka
349f878ecf
zld: mimick Apple and add __DATA_CONST seg
2021-03-17 19:59:13 +01:00
Jakub Konka
62f43fbc06
zld: clean up use of commands.zig module
2021-03-17 19:59:13 +01:00
Jakub Konka
d484b3b3cb
zld: use aarch64 for opcodes
2021-03-17 19:59:13 +01:00
Jakub Konka
dc34ac2b9e
zld: fix incorrect offset calc for DICE
2021-03-17 19:59:13 +01:00
Jakub Konka
5d8944edc1
Revert log.warn hack
2021-03-17 19:59:13 +01:00
Jakub Konka
a1b0ec5277
zld: start bringing x64 up to speed
2021-03-17 19:59:13 +01:00
Jakub Konka
066c1386a3
zld: demote logs from warn to debug
2021-03-17 19:59:13 +01:00
Jakub Konka
b0ee480177
zld: merge and sort sections
2021-03-17 19:59:13 +01:00
Jakub Konka
44ebf48631
zld: fix handling of section alignment
2021-03-17 19:59:13 +01:00
Jakub Konka
7c22f4f851
zld: pass test-std and test-compiler-rt
2021-03-17 19:59:13 +01:00
Jakub Konka
7cbdbab376
zld: differentiate locals from globals
2021-03-17 19:59:13 +01:00
Jakub Konka
7e32947871
zld: add nop to reloc module
2021-03-17 19:59:13 +01:00
Jakub Konka
d2008db623
zld: bullet-proof stubs for long jumps
2021-03-17 19:59:13 +01:00
Jakub Konka
14590795b1
zld: cleanup section alignment when allocating
2021-03-17 19:59:13 +01:00
Jakub Konka
586c704212
zld: pass stage2 tests linked with zld!
2021-03-17 19:59:13 +01:00
Jakub Konka
e825a15b05
zld: replace ldr with add if indivisible
2021-03-17 19:59:13 +01:00
Jakub Konka
f52f23618d
macho: start upstreaming zld
2021-03-17 19:59:13 +01:00
Jakub Konka
0f7b036eb7
Merge pull request #8281 from kubkon/macho-got-refactor
...
stage2+macho: refactor global offset table for incremental linker
2021-03-17 19:44:32 +01:00
Frank Denis
119fc318a7
std/crypto/chacha20: add round-reduced versions & cleanup internals
...
See https://eprint.iacr.org/2019/1492.pdf for justification.
8 rounds ChaCha20 provides a 2.5x speedup, and is still believed
to be safe.
Round-reduced versions are actually deployed (ex: Android filesystem
encryption), and thanks to the magic of comptime, it doesn't take much
to support them.
This also makes the ChaCha20 code more consistent with the Salsa20 code,
removing internal functions that were not part of the public API any more.
No breaking changes; the public API remains backwards compatible.
2021-03-17 11:25:51 -07:00
Andrew Kelley
587243c7a5
Merge pull request #8273 from jedisct1/pbkdf2-check
...
crypto/pbkdf2: simplify the check for the max number of iterations
2021-03-17 11:25:19 -07:00
Jakub Konka
e5234c0e9e
macho: offset table part of GOT
2021-03-17 12:16:36 +01:00
Jakub Konka
b9fa80e588
macho: use latest bind functionality
2021-03-17 12:10:39 +01:00
Jakub Konka
1181543dad
macho: extract writing stub helper preamble into fn
2021-03-17 12:10:39 +01:00