8413 Commits

Author SHA1 Message Date
Michael Dusan
dd66fbb96a
Merge pull request #4811 from mikdusan/fix4634
self-hosted: use fs.selfExePathAlloc
2020-03-25 19:49:52 -04:00
Andrew Kelley
e3fec6cce9
zig cc: add detection for -###
it turns on --verbose-cc and --verbose-link
2020-03-25 19:32:12 -04:00
Benjamin Feng
9dbfee49d7 Carry-over stream error to JSON.stringify 2020-03-25 18:54:04 -04:00
Andrew Kelley
ee6fda2297
Merge pull request #4807 from LemonBoy/tls-touchups
std: Minor changes to TLS handling
2020-03-25 18:53:04 -04:00
Michael Dusan
d554070de1
self-hosted: use fs.selfExePathAlloc
- add fs.selfExePathAlloc
- use fs.selfExePathAlloc instead of fs.selfExeDirPathAlloc
- remove redundant code from fs.selfExeDirPath

closes #4634
2020-03-25 18:40:28 -04:00
Andrew Kelley
f313ab18ae
zig cc: freestanding target implies -nostdlib 2020-03-25 12:28:41 -04:00
Andrew Kelley
6cbe589b51
zig cc: support -T linker script option 2020-03-25 12:05:48 -04:00
Andrew Kelley
3869e80331
Merge pull request #4793 from LemonBoy/netbsd-forever
Netbsd forever
2020-03-25 10:19:49 -04:00
LemonBoy
abcd9ac9d0 Use const instead of var 2020-03-25 12:37:44 +01:00
LemonBoy
a34f67aa66 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-25 12:08:50 +01:00
LemonBoy
778dbc17ac std: Fix setsockopt definition
* Add socketpair definition
2020-03-24 16:06:25 -04:00
Andrew Kelley
cbaede7f55
Merge pull request #4795 from LemonBoy/divtf3
Add __divtf3 to compiler-rt
2020-03-24 14:51:51 -04:00
LemonBoy
3ccf99c0bd std: Slim duplicate logic for some calls 2020-03-24 19:47:18 +01:00
LemonBoy
cc774c603b compiler-rt: Add __divtf3 2020-03-24 18:08:53 +01:00
LemonBoy
4e95662a4a std: Add qNaN constants 2020-03-24 18:08:53 +01:00
Andrew Kelley
39589cffe0
compiler-rt: fix __clear_cache on aarch64 darwin 2020-03-24 11:51:13 -04:00
Andrew Kelley
03013e5176
compiler-rt: aarch64 implementation of __clear_cache 2020-03-24 10:33:23 -04:00
Andrew Kelley
93c7fa105f
Merge remote-tracking branch 'origin/llvm10'
LLVM 10 was released today
2020-03-24 09:57:09 -04:00
Joachim Schmidt
5acc8afb5f
Use math.Order for comparing bigints instead of i8 (#4791) 2020-03-23 23:16:57 -04:00
LemonBoy
c3f93be00c std: Tell pthread the guard page size is zero
On NetBSD this is needed to avoid crashes in pthread_join as the default
value for the guard page size is not ignored even though a custom stack
address is specified.
2020-03-23 23:26:34 +01:00
LemonBoy
d6739b1397 std: Fix undefined field error 2020-03-23 23:26:21 +01:00
LemonBoy
b21d3535a5 std: Fix parameters for pthread_attr_setstack
The guard page size shouldn't be taken into account, pthread is only
interested in the usable area.
2020-03-23 20:12:10 +01:00
LemonBoy
09a5f172f8 std: Different thread stack allocation for NetBSD
* NetBSD is stricter than other OSs and doesn't allow mprotect to mark a
  non-accessible region as RW
* Fix mprotect call over the whole stack, oops
2020-03-23 19:50:29 +01:00
LemonBoy
cda73c3c18 std: Add missing C bits and defines for NetBSD 2020-03-23 18:55:45 +01:00
LemonBoy
761602e3e8 std: Use getdents on all the BSDs
* Use the correct versioned libc calls to avoid nasty surprises
2020-03-23 18:54:14 +01:00
LemonBoy
336ed03f0f debug: Accept relative paths in mapWholeFile 2020-03-23 18:51:49 +01:00
LemonBoy
27344464ed std: Add missing C defines for NetBSD 2020-03-23 18:47:40 +01:00
LemonBoy
2f21c8f5ba stage1: Link pthread on NetBSD 2020-03-23 18:47:39 +01:00
LemonBoy
bab66235b9 stage1: Remove fflush on file open for reading
On NetBSD this caused the libuserland compilation to fail.

Closes #3719
2020-03-23 17:17:28 +00:00
Andrew Kelley
dc44fe053c
zig cc: detect dynamic linker argument 2020-03-23 12:39:18 -04:00
Andrew Kelley
e643b414e4
zig cc: recognize .S and .C as source file extensions 2020-03-23 11:34:16 -04:00
LemonBoy
0cd953d40e ir: Prevent crash when slicing hardcoded pointer
Closes #4780
2020-03-23 09:13:52 -04:00
Andrew Kelley
13d04f9963
Merge pull request #4741 from momumi/master
allow `_` separators in number literals (stage 1)
2020-03-23 00:54:54 -04:00
Andrew Kelley
94f7c56001
riscv: add -mrelax arg for C to work around upstream issue
See #4485
2020-03-22 21:47:19 -04:00
Andrew Kelley
e5e5196d8e
Merge remote-tracking branch 'origin/master' into llvm10 2020-03-22 20:48:21 -04:00
momumi
2d18178c27 minor fixes and more tests for _ separators
* Make the tokenizer spit out an Invalid token on the first invalid
  character found in the number literal.
* More parsing and tokenizer tests for number literals
* fix invalid switch statement in ir.zig
2020-03-23 09:21:34 +10:00
Andrew Kelley
7ffdf59c44
Merge pull request #4774 from ziglang/zig-cc
ability to use `zig cc` as a drop-in C compiler
2020-03-22 19:20:02 -04:00
LemonBoy
9d19d9008e debug: Correct version check in debug_line parser
Version 3 is similar to version 2 plus more opcodes.
2020-03-22 19:19:41 -04:00
LemonBoy
6a89751025 ir: Implement cast from anon struct to union 2020-03-22 19:06:22 -04:00
Andrew Kelley
3bded9cf29
disable failing stack trace test for aarch64 2020-03-22 18:54:19 -04:00
Andrew Kelley
380c276deb
ci: disable qemu-riscv64 tests due to qemu being too old 2020-03-22 17:36:58 -04:00
Andrew Kelley
f9992850a5 simplify cmake logic for finding clang
which fixes the build on windows
2020-03-22 17:35:06 -04:00
Andrew Kelley
87b8b69eb0
update stack trace test expected output 2020-03-22 17:07:24 -04:00
Andrew Kelley
10223eaea0
ci: workaround for apt.llvm.org packaging bug 2020-03-22 17:03:53 -04:00
Andrew Kelley
40f4101802
ci: fix ubuntu package name for lld 2020-03-22 15:44:39 -04:00
Andrew Kelley
8d1659bb39
ci: again fix the cache tarball URLs 2020-03-22 15:35:54 -04:00
Andrew Kelley
adf5af1bc5
ci: update cache tarball URLs 2020-03-22 15:14:46 -04:00
Andrew Kelley
23c263776c
Merge remote-tracking branch 'origin/master' into llvm10 2020-03-22 15:09:29 -04:00
momumi
8de45e5143 update parsing of int literals in self-hosted
* update std.math.big.Int.setString() to ignore underscores and make it
  case insensitive
* fix issue in ir.zig with leading zeroes in integer literals
2020-03-22 13:59:14 +10:00
dbandstra
a8fa1ecd89 fix build.zig addBuildOption function for stream refactor 2020-03-21 23:18:09 -04:00