Commit Graph

10075 Commits

Author SHA1 Message Date
Andrew Kelley
3dc8cb12e8 ir: remove pointless and misleading code in @embedFile 2020-03-06 15:55:18 -05:00
LemonBoy
2e04b61275 std: Work around unexported NtCurrentTeb
Apparently NtCurrentTeb is only exported for i386 and some other
platforms but not for x86_64 nor AArch64. Let's go with the flow and
provide our own NtCurrentTeb like the Windows headers do.

Thank you Microsoft.
2020-03-06 09:17:14 +01:00
LemonBoy
b9a1d67637 std: Nicer way to access the PEB
Use the NtCurrentTeb API instead of using some inline asm, this is much
nicer and also more portable.

Closes #4645
2020-03-06 09:06:26 +01:00
Vexu
eaccfffe56 translate-c: default initialize non-extern variables to undefined 2020-03-06 00:06:45 -05:00
Andrew Kelley
6b069f5c8c Revert "put FreeBSD CI in timeout for misbehavior"
This reverts commit c0c9303bd6.

Thanks to commit c08444b33f we can now
re-enable FreeBSD in the CI.
2020-03-05 23:37:29 -05:00
Michael Dusan
d31b65e762 std: fix sendfile on macOS and FreeBSD
- fix std.os.sendfile/FreeBSD use correct in/out fd_t
- fix std.os.sendfile/macOS use correct in/out fd_t
- undo 1141bfb21b (no longer needed)
- fix c.freebsd.sendfile use off_t value
- fix c.freebsd.sendfile decl correct in/out fd_t
- fix c.darwin.sendfile decl correct in/out fd_t

fix signature param names
2020-03-05 20:46:28 -05:00
Michael Dusan
428677ea36 stage1: fix regression
- regression was introduced by 371c21aa70
2020-03-05 20:45:01 -05:00
Michael Dusan
c08444b33f srht: workaround FreeBSD fiasco 2020-03-05 19:47:28 -05:00
Andrew Kelley
01c722c21c Revert "Allow constant struct val to reallocate its fields when resolving an inferred struct field with a comptime value."
This reverts commit debcc79d56.

This caused a regression when building self-hosted
2020-03-05 17:19:01 -05:00
Michaël Larouche
f5954dad83 Fix crash when freeing empty string as null-terminated sentinel 2020-03-05 17:08:12 -05:00
Michael Dusan
1091fee242 std: format enum-literals 2020-03-05 16:03:12 -05:00
Alexandros Naskos
debcc79d56 Allow constant struct val to reallocate its fields when resolving an inferred struct field with a comptime value. 2020-03-05 15:48:03 -05:00
Andrew Kelley
c92957da0e Merge branch 'update-mingw-w64'
closes #3713
2020-03-05 15:41:33 -05:00
Andrew Kelley
20ac253859 reapply mingw-w64 header patches
Fix compilation w/ clang
f83bb3dd9e
2020-03-05 15:41:28 -05:00
Andrew Kelley
c0242f2310 update mingw-w64 source files to v7.0.0 2020-03-05 15:41:28 -05:00
Andrew Kelley
8e5913cfee update mingw-w64 headers to v7.0.0 2020-03-05 15:41:28 -05:00
Michael Dusan
1aae5bebe9 Merge pull request #4641 from mikdusan/housekeeping
stage1: housekeeping
2020-03-05 14:58:02 -05:00
Michael Dusan
371c21aa70 stage1: housekeeping
- use consistent allocator in `realloc_const_vals_ptrs()`
- unexport `create_fn_raw()`
2020-03-05 12:17:47 -05:00
Vexu
ad27041de9 translate-c demote struct to opaque if unable to translate type 2020-03-05 10:55:32 -05:00
Andrew Kelley
b7614e63f5 Merge pull request #4636 from Vexu/translate-c
Translate-c macro comma operator
2020-03-05 10:38:51 -05:00
Andrew Kelley
d7dc7d7a50 Merge pull request #4633 from daurnimator/4632-i1
Fix formatting of i1 values
2020-03-05 10:33:02 -05:00
Vexu
e063854563 translate-c correct assumption about macros 2020-03-05 12:23:32 +02:00
Vexu
8088bdc6d5 translate-c macro comma operator 2020-03-05 11:22:50 +02:00
daurnimator
e9c3b65bf4 std: use testing.expectEqual in math.absCast tests 2020-03-05 16:02:26 +11:00
daurnimator
488ba1560f std: fix math.absCast on i1 2020-03-05 16:00:19 +11:00
daurnimator
4f58bfe1a8 std: fix formatting of i1 integers 2020-03-05 15:52:19 +11:00
daurnimator
d5359ea541 std: use testing.expectEqualSlices from tests 2020-03-05 15:51:21 +11:00
Andrew Kelley
378bf1c3b7 Merge branch 'LemonBoy-fix-439' 2020-03-04 18:05:34 -05:00
Andrew Kelley
116e2a93f1 update docs for @TypeOf 2020-03-04 18:05:14 -05:00
Andrew Kelley
3e3d464884 @TypeOf avoids heap allocation for only 1 parameter 2020-03-04 17:43:23 -05:00
LemonBoy
2e3e8d0c74 ir: Adapt ir_print for the new @TypeOf format 2020-03-04 17:21:10 -05:00
LemonBoy
e029032251 std: Use @TypeOf(x,y) as return value for max 2020-03-04 17:21:10 -05:00
LemonBoy
0c310f0fbf ir: Implement @TypeOf with multiple arguments
Closes #439
2020-03-04 17:21:10 -05:00
Andrew Kelley
24fc69acad Merge pull request #4573 from alexnask/tuple_concat
Allow concatenation of tuples that contain a mix of runtime and comptime values
2020-03-04 17:09:43 -05:00
Andrew Kelley
f247a90541 get_codegen_ptr_type returns possible error
And fix most of the fallout. This also makes optional pointers not
require resolving zero bits, because the comptime value struct layout no
longer depends on whether the type has zero bits.

Thanks to @LemonBoy for the behavior test case

Closes #4357
Closes #4359
2020-03-04 17:04:59 -05:00
Andrew Kelley
3178807657 Merge remote-tracking branch 'origin/master' into llvm10 2020-03-04 15:35:46 -05:00
Andrew Kelley
6cbd1ac51a zig is now aware of DragonflyBSD versions 2020-03-04 15:34:32 -05:00
Andrew Kelley
3ff2381042 update glibc source files to 2.31
This is mostly minor modifications to license text.
2020-03-04 14:59:09 -05:00
pfg
e3b37fc9c1 Generated documentation mobile support 2020-03-04 10:47:21 -05:00
Timon Kruiper
e095475d92 Fix docs generation
Commit edb210905d caused the docs generation
to fail, because all the type information in pass1 was already freed in
`zig_llvm_emit_output`.
2020-03-04 09:59:21 -05:00
Andrew Kelley
1cf3209cb8 Merge pull request #4623 from ziglang/update-glibc
Update glibc to 2.31
Closes #4459.
2020-03-04 09:01:19 -05:00
Andrew Kelley
447a89cd4d update self-hosted zig targets to print correct glibc availability 2020-03-04 01:05:42 -05:00
Andrew Kelley
b21d44f26a update glibc abilists for 2.31 2020-03-04 00:07:15 -05:00
Andrew Kelley
cd33c5bfe8 zig build: update InstallRawStep to new std.fs API
closes #4622
2020-03-04 00:00:42 -05:00
Andrew Kelley
74fef9db6e update update_glibc tool to latest zig 2020-03-03 22:52:03 -05:00
Andrew Kelley
67480cd515 update glibc headers to 2.31 2020-03-03 22:46:57 -05:00
Andrew Kelley
3841acf7ef update process_headers tool to latest zig 2020-03-03 22:40:41 -05:00
Andrew Kelley
8aaab75af0 docs: remove reference to deprecated builtins
closes #3959
2020-03-03 22:14:29 -05:00
Andrew Kelley
c0c9303bd6 put FreeBSD CI in timeout for misbehavior
FreeBSD is dealing with some weird upstream bug right now. We can try to
re-enable this when it is fixed.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244549

very naughty
2020-03-03 21:32:01 -05:00
Andrew Kelley
3b235cfa80 std.zig.CrossTarget: fix compile errors
closes #4620
2020-03-03 21:09:32 -05:00