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
6096dc5f94
move some of the installation from cmake to zig build
...
This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.
On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".
After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.
This closes #2874 .
It also closes #2585 . `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
2019-07-15 01:45:26 -04:00
Andrew Kelley
1d2fc446bd
cap getdents length argument to INT_MAX
...
the linux syscall treats this argument as having type int, so passing
extremely long buffer sizes would be misinterpreted by the kernel.
since "short reads" are always acceptable, just cap it down.
patch based on musl commit 3d178a7e2b75066593fbd5705742c5808395d90d
2019-07-08 17:52:28 -04:00
Andrew Kelley
1a1598c58c
stack traces on segfault by default for linux-x86_64
...
closes #2355
2019-07-02 13:41:16 -04:00
daurnimator
4565f50efe
std: add linux kernel definitions for io_uring
2019-06-10 14:40:54 +10:00
daurnimator
ae604b4464
std: add linux kernel_rwf type and preadv2+pwritev2
2019-06-10 14:40:54 +10:00
LemonBoy
477ee9c8b9
Fix some syscalls on arm64
2019-05-30 16:28:33 +02:00
Andrew Kelley
c66a747045
Merge pull request #2546 from LemonBoy/sigaltstack
...
Add sigaltstack syscall for Linux
2019-05-29 19:38:01 -04:00
Andrew Kelley
bfc86776d5
run zig fmt to update use
to usingnamespace
2019-05-29 19:09:58 -04:00
LemonBoy
bcdbd8d169
Add sigaltstack syscall
2019-05-28 15:22:19 +02:00
Andrew Kelley
0c6ab61b22
tests passing on linux
2019-05-26 23:35:26 -04:00
Andrew Kelley
2b42e910bf
behavior tests passing on Linux
2019-05-26 19:56:37 -04:00
Andrew Kelley
44a049e01e
more cleanup. down to just the @hasDecl
builtin
2019-05-26 18:32:45 -04:00
Andrew Kelley
2f040a23c8
clean up references to os
2019-05-26 18:32:44 -04:00
Andrew Kelley
7cb6279ac0
clean up references to posix
2019-05-26 18:32:44 -04:00
Andrew Kelley
3d61e42282
rename "posix" to "bits"
2019-05-26 18:32:44 -04:00
Andrew Kelley
2def23063f
more progress. moving windows API layer to its own file
2019-05-26 18:32:44 -04:00
Andrew Kelley
daae7e1f5a
more progress on posix API layer
...
see #2380
2019-05-26 18:32:43 -04:00
Andrew Kelley
67726e36b0
extract posix functions from std/os.zig to std/os/posix.zig
...
See #2380
2019-05-26 18:32:40 -04:00
LemonBoy
51aaa02679
VDSO calls must use the C CC
2019-05-16 22:10:38 -04:00
LemonBoy
1b23348f30
linux: Minor zig fmt
induced reformatting
2019-05-11 10:34:22 +02:00
LemonBoy
715d808f14
linux: Fix clock_gettime on systems w/o VDSO
2019-05-11 10:33:41 +02:00
Andrew Kelley
9c0596e627
Merge pull request #2427 from LemonBoy/linux-tls
...
Proper support for TLS on linux
2019-05-07 12:26:26 -04:00
Andrew Kelley
097a62555e
Merge pull request #2439 from LemonBoy/fixes-fixes-fixes
...
A batch of miscellaneous fixes
2019-05-07 12:26:02 -04:00
LemonBoy
d8ab301aa8
std: Implement TLS support for Linux
...
Tested on x86_64, i386, ARM, AARCH64
2019-05-07 13:09:18 +02:00
Andrew Kelley
7432fb04d6
Merge pull request #2354 from LemonBoy/iterate_phdr_impl
...
dl_iterate_phdr implementation
2019-05-06 15:48:37 -04:00
LemonBoy
60242e96df
Fix definition of epoll_* struct on non x86_64 arches
2019-05-06 21:39:02 +02:00
LemonBoy
07dfccf967
Review
2019-05-05 13:00:20 +02:00
Andrew Kelley
70a9ee3dd6
Merge branch 'stdlib-32b' of https://github.com/LemonBoy/zig into LemonBoy-stdlib-32b
2019-05-04 14:46:35 -04:00
LemonBoy
b612512bb5
std: Remove some assumptions about the host platform
...
The stdlib is now 32-bit friendly.
2019-05-04 08:44:26 +02:00
daurnimator
fd056752da
std: add sendmmsg on linux
2019-04-30 16:47:09 +10:00
LemonBoy
074ddf1ac6
Implementation of dl_phdr_info
2019-04-24 20:53:46 +02:00
daurnimator
217b95da31
std: add msghdr_const
...
As `iovec_const` is to `iovec`, `msghdr_const` is to `msghdr`
2019-04-21 21:53:24 +10:00
Andrew Kelley
e402455704
rename std lib files to new convention
2019-03-02 16:46:04 -05:00
Andrew Kelley
44d8d654a0
fix test failure, organize code, add new compile error
2018-02-05 09:26:39 -05:00
Ben Noordhuis
73ee434c8c
Use /dev/urandom and sysctl(RANDOM_UUID) on Linux.
...
Add fallback paths for when the getrandom(2) system call is not
available. Try /dev/urandom first and sysctl(RANDOM_UUID) second.
The sysctl issues a warning in the system logs with some kernels but
that seems like an acceptable tradeoff for the fallback of a fallback.
2018-02-04 18:58:36 +01:00
Andrew Kelley
3671582c15
syntax: functions require return type. remove ->
...
The purpose of this is:
* Only one way to do things
* Changing a function with void return type to return a possible
error becomes a 1 character change, subtly encouraging
people to use errors.
See #632
Here are some imperfect sed commands for performing this update:
remove arrow:
```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```
add void:
```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```
Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-25 04:10:11 -05:00
Andrew Kelley
4183c6f1a5
move std/debug.zig to a subdirectory
...
self hosted compiler parser tests do some fuzz testing
2017-12-23 22:15:48 -05:00
Andrew Kelley
d917815d81
explicitly return from blocks
...
instead of last statement being expression value
closes #629
2017-12-22 00:50:30 -05:00
Andrew Kelley
1fdebc1dc4
wip export rewrite
2017-12-18 09:59:57 -05:00
Andrew Kelley
a890380b6a
fix windows trying to run linux-only tests
2017-11-10 18:29:49 -05:00
Andrew Kelley
5ae53dacfb
rename test
2017-11-10 18:24:52 -05:00
Brendon Scheinman
87407b54b6
add epoll and timerfd support on linux
2017-11-10 15:12:46 -08:00
Andrew Kelley
fd2d502e41
std.os.ChildProcess: ability to set both uid and gid
2017-09-26 02:42:06 -04:00
Andrew Kelley
cba4a9ad4a
update std.os.ChildProcess API
...
* add std.os.ChildProcess.setUserName
* add std.os.getUserId
2017-09-26 01:01:49 -04:00
Andrew Kelley
a81e516174
fix ChildProcess.spawn on darwin
2017-09-08 00:04:43 -04:00
Andrew Kelley
9fb4d1fd6c
std: os.ChildProcess knows when its child died
...
using signal handlers
2017-09-07 23:10:51 -04:00
Andrew Kelley
7e59f4ff69
std: add os.sleep
2017-09-06 16:59:22 -04:00
Andrew Kelley
ebdc6b594d
all tests passing in MacOS
...
depends on LLD 5.0.0 with 3 patches
See #273
2017-08-27 17:16:42 -04:00
Andrew Kelley
ff2c794612
all behavior tests passing for macos
...
See #273
2017-08-27 05:15:24 -04:00