Andrew Kelley
28b7306a31
Merge pull request #4880 from daurnimator/use-spanZ
...
Take advantage of mem.spanZ accepting null
2020-03-31 11:57:31 -04:00
Andrew Kelley
d9d8c42426
remove unnecessary inline
...
works around a bug triggered by previous commit
2020-03-31 11:18:11 -04:00
Andrew Kelley
47a0e3ec5e
Merge pull request #4871 from boothby/issue4769
...
Address bugs when //, /// or //! are immediately followed by EOF
2020-03-31 10:56:21 -04:00
daurnimator
3cf302a71d
Tidy up some mem.spanZ use-sites now that null is accepted
2020-04-01 01:50:34 +11:00
Andrew Kelley
6d25e45123
Merge branch 'LemonBoy-more-cache'
2020-03-31 10:49:06 -04:00
Andrew Kelley
0e372ccff5
clean up the duplicate export logic for __clear_cache
2020-03-31 10:48:48 -04:00
daurnimator
b1eb831aba
std: fix mem.span* when an optional pointer is passed
2020-04-01 01:44:55 +11:00
LemonBoy
e9c49f423d
compiler-rt: More clear_cache implementations
2020-03-31 10:36:12 -04:00
Tetralux
d57b5205c6
Fix std.fifo.LinearFifo
...
- Fix undeclared variable in 'writeItem'
- Clarify docs of `read` regarding bytes vs. items
- Normalize 'writeable' to 'writable' (the more common parlance)
2020-03-31 10:18:58 -04:00
daurnimator
63409cf422
std: linux syscall numbers are now an extensible enum
2020-03-31 10:16:20 -04:00
Andrew Kelley
839d85e440
fixes to 32-bit handling, to support 32-bit arm
2020-03-31 10:10:31 -04: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
Kelly Boothby
1111d3ad13
fixed bugs hitting EOF immediately after //, /// or //!
2020-03-30 18:30:03 -07:00
Kelly Boothby
44aadaff59
added unit tests to demonstrate #4769 and related bugs
2020-03-30 18:29:48 -07: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