Commit Graph

5813 Commits

Author SHA1 Message Date
Andrew Kelley
d6d0bb0542
zig build: adjust DESTDIR logic
now if DESTDIR is provided then the default install prefix is /usr.
otherwise the default install prefix is still zig-cache directly.

DESTDIR is prepended to the prefix to match what make install does.
2019-07-22 10:45:59 -04:00
Andrew Kelley
32d0ac1355
fix wrong calling convention on async resume 2019-07-22 00:07:48 -04:00
Andrew Kelley
59bf9ca58c
implement async function parameters 2019-07-21 23:27:47 -04:00
Andrew Kelley
11bd50f2b2
implement coroutine resume 2019-07-21 20:54:08 -04:00
Andrew Kelley
78e03c466c
simple async function passing test 2019-07-21 19:56:37 -04:00
Andrew Kelley
77c2ac3fcd
zig build: support DESTDIR environment variable
closes #2929
2019-07-21 18:04:23 -04:00
Andrew Kelley
56c08eb302
returning from async fn adds bad resume safety 2019-07-21 17:17:44 -04:00
Andrew Kelley
6053ca4f69
fix not jumping to entry 2019-07-21 17:10:16 -04:00
Andrew Kelley
27a5f2c4fa
remove errors for async calling convention 2019-07-21 16:43:43 -04:00
Andrew Kelley
72e983670e
simple async function call working 2019-07-21 16:21:16 -04:00
Andrew Kelley
a2e1be0346
docs: don't try to run the undefined behavior example test 2019-07-20 13:59:18 -04:00
Andrew Kelley
2c1e955de7
always give the type to byval attribute 2019-07-20 13:32:50 -04:00
Andrew Kelley
54e716afdc
remove coroutines implementation and promise type 2019-07-19 18:18:44 -04:00
Andrew Kelley
05454123d4
update clang driver code to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 18:07:31 -04:00
Andrew Kelley
f429f4dcab
Merge branch 'fengb-tokenize-ampamp'
closes #2723
closes #2660
2019-07-19 17:55:12 -04:00
Andrew Kelley
8ea8cff491
slightly simpler implementation 2019-07-19 17:54:06 -04:00
Benjamin Feng
111d3792e0
Docgen invalid for && 2019-07-19 17:11:58 -04:00
Benjamin Feng
484f8a4cc2
Switch old switch / @TagType() to use inferred enums 2019-07-19 17:11:58 -04:00
Benjamin Feng
4708fb23c0
Generate parse error from && 2019-07-19 17:11:58 -04:00
Benjamin Feng
d4ff27180b
Tokenize '&&' as AmpersandAmpersand 2019-07-19 17:11:58 -04:00
Andrew Kelley
af8661405b
fix usingnamespace
It used to be that usingnamespace was only allowed at top level. This
made it OK to put the state inside the AST node data structure. However,
now usingnamespace can occur inside any aggregate data structure, and
therefore the state must be in the TopLevelDeclaration rather than in
the AST node.

There were two other problems with the usingnamespace implementation:

 * It was passing the wrong destination ScopeDecl, so it could cause an
   incorrect error such as "import of file outside package path".
 * When doing `usingnamespace` on a file that already had
   `pub usingnamespace` in it would "steal" the usingnamespace, causing
   incorrect "use of undeclared identifier" errors in the target file.

closes #2632
closes #2580
2019-07-19 16:56:44 -04:00
Andrew Kelley
70e05c67ce
update libcxx to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:55:59 -04:00
Andrew Kelley
dab0cf6428
update libunwind to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:54:00 -04:00
Andrew Kelley
2117fbdae3
update C headers to llvm9
upstream commit 1931d3cb20a00da732c5210b123656632982fde0
2019-07-19 16:50:45 -04:00
Andrew Kelley
1d07bbbef2
zig build: add valgrind cli options 2019-07-18 20:03:38 -04:00
Andrew Kelley
70da0762f7
better riscv syscalls 2019-07-18 18:15:50 -04:00
Michael Dusan
e5d032982e closes #2916 2019-07-18 16:42:56 -04:00
Andrew Kelley
03a3b1ca39
riscv workarounds for llvm not having good asm integration 2019-07-18 15:20:58 -04:00
Andrew Kelley
a3854d042e
basic riscv support
llvm is giving me `error: couldn't allocate output register for
constraint '{a0}'` which is a bug that needs to be fixed upstream.
2019-07-18 15:03:21 -04:00
Andrew Kelley
07f0de6a8a
compiler-rt: add __muldi3 2019-07-18 13:54:22 -04:00
Andrew Kelley
afbf99c846
riscv musl: only add the +a feature 2019-07-18 12:28:24 -04:00
Andrew Kelley
d4ca337e6b
improvements to riscv support 2019-07-18 12:21:57 -04:00
Andrew Kelley
04ce5376a8
carry some upstream patches to musl to fix riscv inline asm
Upstream commits:
 * 8eb49e0485fc547eead9e47200bbee6d81f391c1
 * 2dcbeabd917e404a0dde0195388da401b849b9a4
 * f0eb2e77b2132a88e2f00d8e06ffa7638c40b4bc

These will be in the next version of musl, so no harm carrying them
here.
2019-07-18 11:43:39 -04:00
Andrew Kelley
aaa4bf75d3
msvc libc: provide _fltused symbol 2019-07-17 18:11:03 -04:00
Andrew Kelley
e816d592e8
update zig codebase to llvm 9 2019-07-17 17:47:39 -04:00
Andrew Kelley
3879bebc37
WIN32 -> _WIN32 2019-07-17 16:10:54 -04:00
Andrew Kelley
95e04e3874
back to msvc as the default C ABI on Windows
Zig provides a libc for the GNU C ABI on Windows, and cannot (at least
yet) provide one for the MSVC C ABI. However when not linking libc,
zig has no problem targeting MSVC as the C ABI. And this should be the
default.

Related: #2911
2019-07-17 12:40:48 -04:00
dimenus
d64bd30690 fixed slice length in getEnvVarOwned 2019-07-17 12:13:50 -04:00
Andrew Kelley
8f92a49dfd
update to llvm9 trunk 2019-07-16 22:23:48 -04:00
Andrew Kelley
c0b4121ff2
libc headers before C language headers, and disable libunwind on arm32 2019-07-16 21:38:18 -04:00
Andrew Kelley
ec92739022
Merge branch 'update-musl'
closes #2601
2019-07-16 20:07:05 -04:00
Andrew Kelley
d994379173
update bundled musl source to 1.1.23 2019-07-16 19:54:14 -04:00
Andrew Kelley
f70ce707e2
update musl headers to musl v1.1.23 2019-07-16 19:02:51 -04:00
Andrew Kelley
b1f8b53d20
rename internal names regarding usingnamespace 2019-07-16 16:20:54 -04:00
Andrew Kelley
158e2312ea
Merge branch 'JohnathanFL-master'
closes #2900
closes #2894
2019-07-16 13:14:11 -04:00
Andrew Kelley
23dd7f4527
organize the docs and some rewording 2019-07-16 13:13:21 -04:00
JohnathanFL
475a181028
Add multidimensional array example 2019-07-16 13:02:30 -04:00
Andrew Kelley
15ed47921f
Merge branch 'msvc-libc-2064' of https://github.com/dimenus/zig into dimenus-msvc-libc-2064 2019-07-16 12:51:02 -04:00
daurnimator
3a67c13b5d cmake: allow user to select static vs dynamic LLVM 2019-07-16 12:33:13 -04:00
Andrew Kelley
9dcddc2249
retire the example/ folder, rename test-build-examples to "standalone"
closes #2759
2019-07-16 12:15:46 -04:00