Commit Graph

6630 Commits

Author SHA1 Message Date
Noam Preil
b8305b5648 Don't save/restore stack on newStackCall to noreturn function 2019-10-26 16:45:46 -04:00
Andrew Kelley
ee21bab253
ci: -Dskip-release for aarch64 to hit 1 hour time limit 2019-10-26 13:14:54 -04:00
Timon Kruiper
d04c58816d Translate-c: Fix a segfault when to many errors are emitted
This was already fixed when doing `@cImport`, but not yet when
running `zig translate-c`.
2019-10-26 13:09:23 -04:00
Andrew Kelley
05fd59e06a
ci: enable more passing tests on aarch64-linux 2019-10-26 12:09:15 -04:00
Michael Dusan
3aeb1b115d stage1: fix compile error on macOS Xcode 11.2
src/codegen.cpp:7713:33: error: unused variable 'global_linkage_values' [-Werror,-Wunused-const-variable]
static const GlobalLinkageValue global_linkage_values[] = {
2019-10-25 17:49:01 -04:00
Andrew Kelley
e219f0c786
fix regression in zig run
changes in 1dcf540426 added a "double
free" of the progress node, causing a segfault for `zig run` when there
is a terminal attached. fixed.
2019-10-25 13:03:12 -04:00
Andrew Kelley
952aa7a9c1
ci: perform git config inside zig git repo dir 2019-10-25 04:26:22 -04:00
Andrew Kelley
c5e26b8673
ci: force git name-rev to be 9 on all targets 2019-10-25 03:27:00 -04:00
Andrew Kelley
aa2607a109
Merge branch 'ci-drone-cloud' 2019-10-24 21:41:14 -04:00
Andrew Kelley
6eba65bd7f
ci: add aarch64 to download page 2019-10-24 21:40:26 -04:00
Andrew Kelley
bf5be65be6
disable not working stuff 2019-10-24 21:13:47 -04:00
Andrew Kelley
55c282ed51
os.dup2: handle EBAF 2019-10-24 21:13:05 -04:00
Andrew Kelley
f6367a0751
ci: build docs, fix PR logic 2019-10-24 20:47:50 -04:00
Andrew Kelley
695a746aa0
ci: use x86_64 namespaced docker image
I took a risk that docker had implemented namespacing with regards to
architectures correctly, but of course they didn't. So the CI docker
image for x86_64 was clobbered by an aarch64 image with the same name.

Now we're doing arch namespaces with the tag name, so here's the x86_64
one.
2019-10-24 20:46:07 -04:00
Andrew Kelley
551e70dcb2
ci: add s3 secrets to drone config 2019-10-24 19:46:11 -04:00
Andrew Kelley
43f5054a90
ci: drone tests only aarch64 with docker image 2019-10-24 19:46:11 -04:00
Andrew Kelley
79cb383f7d
fix 32-bit build of translate_c.zig 2019-10-24 19:46:11 -04:00
Andrew Kelley
0e9f32d42b
disable static build for now until the docker image is ready 2019-10-24 19:46:11 -04:00
Andrew Kelley
099532af87
add Drone Cloud CI configuration 2019-10-24 19:46:11 -04:00
Andrew Kelley
ad438a95c5
avoid passing -march=native when not supported
Clang does not support -march=native for all targets.
Arguably it should always work, but in reality it gives:
error: the clang compiler does not support '-march=native'
If we move CPU detection logic into Zig itelf, we will not need this,
instead we will always pass target features and CPU configuration explicitly.
For now, we simply avoid passing the flag when it is known to not be
supported.
2019-10-24 19:43:56 -04:00
Andrew Kelley
f8bd1cd3b1
implement partial C ABI support for aarch64 2019-10-24 19:13:21 -04:00
Sebastian Keller
6257b4c596 Shortened switch statement 2019-10-24 22:44:12 +02:00
Andrew Kelley
32c89531b1
Add missing compile error when ptr used instead of array
in array literals.

Fixes #3524
2019-10-24 16:23:33 -04:00
Sebastian Keller
b82b6a7093 Added 'writeJson' to write_stream.zig:
Small addition to make writing a json value easier
2019-10-24 14:23:36 +02:00
Andrew Kelley
345042ecbc
Merge pull request #3519 from ziglang/move-builtin-types
move types from builtin to std
2019-10-24 02:25:22 -04:00
Andrew Kelley
60cd11bd4b
get rid of std.os.foo.is_the_target
It had the downside of running all the comptime blocks and resolving
all the usingnamespaces of each system, when just trying to discover if
the current system is a particular one.

For Darwin, where it's nice to use `std.Target.current.isDarwin()`, this
demonstrates the utility that #425 would provide.
2019-10-24 01:14:52 -04:00
Andrew Kelley
8591731f2b
refAllDecls in a test block to limit when it gets run 2019-10-24 00:32:18 -04:00
Andrew Kelley
17eb24a7e4
move types from builtin to std
* All the data types from `@import("builtin")` are moved to
  `@import("std").builtin`. The target-related types are moved
  to `std.Target`. This allows the data types to have methods, such as
  `std.Target.current.isDarwin()`.
 * `std.os.windows.subsystem` is moved to
   `std.Target.current.subsystem`.
 * Remove the concept of the panic package from the compiler
   implementation. Instead, `std.builtin.panic` is always the panic
   function. It checks for `@hasDecl(@import("root"), "panic")`,
   or else provides a default implementation.

This is an important step for multibuilds (#3028). Without this change,
the types inside the builtin namespace look like different types, when
trying to merge builds with different target settings. With this change,
Zig can figure out that, e.g., `std.builtin.Os` (the enum type) from one
compilation and `std.builtin.Os` from another compilation are the same
type, even if the target OS value differs.
2019-10-23 19:09:49 -04:00
Jonathan Marler
ef62452363 Handle TERM=dumb for stdout/stderr 2019-10-23 11:44:39 -04:00
Andrew Kelley
e98e5dda52
implement safety for resuming non-suspended function
closes #3469
2019-10-22 23:43:27 -04:00
Andrew Kelley
1dcf540426
main.cpp: fix not ending progress node for zig build 2019-10-22 23:32:06 -04:00
emekoi
cb8dacabd8 explicity linked ntdll on mingw-w64 2019-10-22 20:42:51 -04:00
Andrew Kelley
f65b1d4680
integrate stage1 progress display with semantic analysis 2019-10-22 17:52:12 -04:00
Maximilian Hunt
dc080573d1 Add documentation on function parameter type inference. 2019-10-22 15:28:21 -04:00
Andrew Kelley
0dbdb6329f
Merge pull request #3503 from MasterQ32/markdown-renderer
Starts to implement markdown parser.
2019-10-22 15:26:42 -04:00
Felix Queißner
c71857703f Adds documentation for std.fmt.format grammar and customization. (#3474) 2019-10-22 14:58:27 -04:00
Felix Queißner
03f1ad5007 Merge branch 'master' of https://github.com/ziglang/zig into markdown-renderer 2019-10-22 20:29:25 +02:00
Andrew Kelley
e839250c51
Merge branch 'stratact-no-dir-allocators'
closes #2885
closes #2886
closes #2888
closes #3249
2019-10-21 23:54:29 -04:00
Andrew Kelley
a5cc758036
std.os.accept4: improve docs and integrate with evented I/O 2019-10-21 23:23:11 -04:00
Jonathan Marler
87b11617b5 Fix accept function API
The sockaddr pointer and size of the accept function points to a data structure that can only be determined at runtime.  The only requirement is that it must be large enough to hold 2 bytes for the address family value.  Typeical usage of the socket API is for UDP/TCP IPv4 and IPv6 sockets, which use sockaddr_in and sockaddr_in6.  And some sockets can actually support both simultaneously in which case the app may want to have access to the size of the returned sockaddr.  Operating systems can even support custom protocols where they use custom sockaddr data structures.  In this case the standard library would have no knowledge of the actual size of the sockaddr being passed into the accept function.  In this case the standard library should defer to the app to pass in the size of their structure.
2019-10-21 23:12:35 -04:00
Vexu
2550cb4638 remove pub syntax for container fields 2019-10-21 23:04:19 -04:00
Andrew Kelley
064377be9a
test runner: restore previous behavior of printing all tests passed 2019-10-21 22:21:18 -04:00
Andrew Kelley
fc6f84f3f0 fix os.unlinkatW implementation 2019-10-21 20:58:53 -04:00
Andrew Kelley
65165554d0
test runner: restore previous behavior when...
...stderr does not support ansi escape codes
2019-10-21 20:50:47 -04:00
Andrew Kelley
9a82f00a4f
add freebsd AT_* bits 2019-10-21 20:50:47 -04:00
Andrew Kelley
5917572e59
cleanup 2019-10-21 20:50:47 -04:00
Andrew Kelley
98c4365b66 darwin: add AT_* bits 2019-10-21 19:39:30 -04:00
Andrew Kelley
87f632b08a fs.Dir.openDir: use empty object name for "." on Windows 2019-10-21 19:19:49 -04:00
Andrew Kelley
859cbef8a4
test runner: refresh display before running test
This makes it so that when a test fails quickly, and writes output, it
will do so after the test name is printed.
2019-10-21 19:01:08 -04:00
Andrew Kelley
16a91e6a45
adjust test runner to print the test name when error occurs 2019-10-21 18:36:37 -04:00