daurnimator
a32d88f12c
std: add support to std.json.stringify for null literals
2020-04-01 00:12:59 +11:00
daurnimator
62fbb6b874
std: allow picking between serialising []u8 as string or array
2020-04-01 00:12:59 +11:00
daurnimator
edf487b126
std: add options to std.json.stringfy to control escaping
2020-04-01 00:12:59 +11:00
daurnimator
17f5d04bed
std: use json.stringify logic in some json.WriteStream code paths
2020-04-01 00:12:59 +11:00
daurnimator
5a053247e2
std: use stringify from Value.dump; remove other dump helpers
2020-04-01 00:12:59 +11:00
daurnimator
e88543a504
std: add jsonStringify trait to json Value objects
2020-04-01 00:07:31 +11:00
daurnimator
48e7c6cca6
std: add whitespace control to json.stringify
2020-03-31 23:57:00 +11:00
daurnimator
3a0875d9e8
std: have json tests take options parameter
2020-03-31 23:19:24 +11:00
Ali Ahmed
45dc2587a3
Fix Readme to point to llvm for brew commands
...
* Homebrew has updated llvm to point to llvm@10
2020-03-30 23:21:40 -04:00
Andrew Kelley
1df85d1509
Merge branch 'FireFox317-clear-cache'
2020-03-30 23:15:33 -04:00
Andrew Kelley
83ff94b1cc
compiler-rt: don't export __clear_cache when no impl available
2020-03-30 23:15:07 -04:00
Timon Kruiper
f6f03cd90f
compiler-rt: implement clear_cache for arm32-linux
2020-03-31 00:29:41 +02:00
Andrew Kelley
cfedd3aca2
revert detection of rtti and exceptions
...
This caused link errors in c++ code because it was not correct to pass
these flags to child codegens. And that was the only reason to detect
these flags. Otherwise we can safely rely on non-explicitly-detected
flag forwarding.
2020-03-30 17:42:30 -04:00
Andrew Kelley
6408766d6b
linking: remove check for target_supports_libunwind
...
I'm not sure why this was ever there. Maybe it was working around a
problem with LLVM 9. Anyway this fixes linking C++ code for 32 bit
arm and riscv.
2020-03-30 15:50:53 -04:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
...
See #3811
2020-03-30 14:23:22 -04:00
Andrew Kelley
b980568c81
add peer type resolution for mixed-const []T and *[N]T
...
closes #4766
This commit also fixes the implementation of some utility functions for
adjusting properties of pointer types. Previously these functions would
incorrectly drop vector, sentinel, and inference metadata.
2020-03-30 13:02:50 -04:00
Sebastian
ef419dd72d
mem.zeroes .Array improvements
...
Before (when given an array with many elements):
```
zig\std\mem.zig:345:13: error: evaluation exceeded 1000
backwards branches
for (array) |*element| {
^
```
related to https://github.com/ziglang/zig/issues/4847#issuecomment-605721461
2020-03-30 11:16:25 -04:00
daurnimator
3be720a729
std: mem span functions can take an optional pointer
2020-03-30 11:04:58 -04:00
LemonBoy
c1cc1ebc35
ir: Avoid constant-folding ptr to sentinels
...
Constant-folding the pointers to the expected sentinel value have some
big problems: it hides the real content of the array, makes the pointer
to the sentinel point to a completely different memory region and treats
it like a const value even when the underlying array is mutable.
Fixes #4840
2020-03-30 11:03:56 -04:00
daurnimator
8cad453495
std: fix compile error since WinsockError was changed
2020-03-30 11:02:06 -04:00
Brian Cain
607892a30d
Create an "LLD_LIBDIRS" var to override lld loc
2020-03-30 11:01:36 -04:00
LemonBoy
1ef6f068f5
compiler-rt: Implement all the shift builtins
...
* Unify all the code paths with a generic function
* Add some EABI aliases
Closes #4853
2020-03-30 10:58:47 -04:00
daurnimator
9bc8a1e1d0
std: add some missing errnos on linux
2020-03-30 10:55:18 -04:00
daurnimator
356ef3840f
std: update for linux 5.6 release
2020-03-30 10:55:18 -04:00
Michael Raymond
de9933761c
std.zig.render: fix newlines before DocComments
2020-03-29 22:41:39 -04:00
Andrew Kelley
b717df786b
Merge pull request #4845 from xackus/fix-parseFloat
...
fix overflow in parseFloat and cleanup
2020-03-29 22:40:32 -04:00
Andrew Kelley
f9f7deaeda
linking against c++ does not trigger system library directories
2020-03-29 20:58:59 -04:00
xackus
6809222d32
cleanup parse_float.zig
2020-03-29 20:52:25 +02:00
Andrew Kelley
5aa2812507
linking is now aware -lm is provided by mingw-w64
2020-03-29 13:17:21 -04:00
Andrew Kelley
c70471fae6
enable now-passing test cases
...
These can now be enabled thanks to bug fixes that landed in
LLVM 10.
2020-03-29 10:34:12 -04:00
Andrew Kelley
38a1af5d4f
zig cc: -O0 also counts as debug mode
2020-03-29 10:34:12 -04:00
xackus
d1202b1f66
fix overflow in parseFloat
2020-03-29 11:50:41 +02:00
Andrew Kelley
86795c03f9
Merge pull request #4844 from layneson/translatec_string_concat
...
Support string concatenation in Translate-C
2020-03-29 00:31:50 -04:00
Sebastian
2b0d66736a
tcpConnectToHost - fixed compilation error
...
before:
```
std\net.zig:403:23: error: type '@TypeOf(std.net.getAddressList).ReturnType.ErrorSet!*std.net.AddressList' does not support field access
const addrs = list.addrs.toSliceConst();
^
```
2020-03-28 21:34:50 -04:00
Layne Gustafson
a55897106e
Add macro string concat tests
2020-03-28 20:40:26 -04:00
Layne Gustafson
2a05ca1c94
Conv macro string concat to ++
2020-03-28 20:40:13 -04:00
Andrew Kelley
f9db21f03e
Merge pull request #4838 from squeek502/for-linker
...
zig cc: Add support for -Xlinker, --for-linker, --for-linker=, -z
2020-03-28 12:03:35 -04:00
Luna
2028b4ce91
Fix typo in Serializer declaration
2020-03-28 12:01:29 -04:00
LemonBoy
d788b0cd8b
std: Minor changes to TLS handling
...
* Always allocate an info block per-thread so that libc can store
important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
possible.
2020-03-28 11:20:38 -04:00
Ryan Liptak
cc7c670851
Sync clang_options_data.zig with update_clang_options
...
Some of the recent c++ related options were added to update_clang_options but didn't make it into clang_options_data.zig
2020-03-28 00:39:33 -07:00
Ryan Liptak
874b4618ca
zig cc: Add support for -z
...
This is only the first step; it makes zig cc recognize -z and append it to the linker args, but the linker arg parsing doesn't support -z yet so it will just give the warning 'unsupported linker arg: -z'
2020-03-28 00:35:54 -07:00
Ryan Liptak
b0b29b8a2f
zig cc: Add support for -Xlinker, --for-linker, --for-linker=
2020-03-27 23:32:01 -07:00
Andrew Kelley
12e1c6e21c
Merge pull request #4835 from squeek502/export-dynamic
...
-rdynamic/--export-dynamic fixes
2020-03-28 02:16:09 -04:00
Andrew Kelley
69aa09948b
cmake: support cross compiling
2020-03-27 23:43:21 -04:00
Andrew Kelley
107b5196f6
Merge pull request #4827 from ziglang/zig-cpp
...
support compiling and linking c++ code
2020-03-27 22:35:13 -04:00
Andrew Kelley
a258741084
initial support of response files
...
See #4833
It doesn't support comments or quotes yet.
2020-03-27 22:24:40 -04:00
Andrew Kelley
e803490a56
cmake: support finding a cross compiled llvm
2020-03-27 22:24:15 -04:00
Michael Dusan
33819ecfbc
windows: don't hard-code forward-slash paths
...
`zig targets` -> unable to list targets: BadPathName
2020-03-27 21:28:52 -04:00
Andrew Kelley
0d7bd9f3ce
Merge pull request #4832 from LemonBoy/watwatwat
...
Fix the weird-ass crash on AArch64
2020-03-27 21:28:16 -04:00
Ryan Liptak
e7847f8d42
zig cc: Add --export-dynamic linker flag support
2020-03-27 17:42:02 -07:00