Commit Graph

16 Commits (733f1c25bd34270b76c5fa43928dfffda1ecd5e3)

Author SHA1 Message Date
Andrew Kelley 4616af0ca4
introduce operating system version ranges as part of the target
* re-introduce `std.build.Target` which is distinct from `std.Target`.
   `std.build.Target` wraps `std.Target` so that it can be annotated as
   "the native target" or an explicitly specified target.
 * `std.Target.Os` is moved to `std.Target.Os.Tag`. The former is now a
   struct which has the tag as well as version range information.
 * `std.elf` gains some more ELF header constants.
 * `std.Target.parse` gains the ability to parse operating system
   version ranges as well as glibc version.
 * Added `std.Target.isGnuLibC()`.
 * self-hosted dynamic linker detection and glibc version detection.
   This also adds the improved logic using `/usr/bin/env` rather than
   invoking the system C compiler to find the dynamic linker when zig
   is statically linked. Related: #2084
   Note: this `/usr/bin/env` code is work-in-progress.
 * `-target-glibc` CLI option is removed in favor of the new `-target`
   syntax. Example: `-target x86_64-linux-gnu.2.27`

closes #1907
2020-02-28 14:51:53 -05:00
LemonBoy 563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
kprotty c912296443 SpinLock: loopHint & yield distinction 2019-12-17 15:38:00 -06:00
kprotty 947db78622 Spinlock: remove Backoff & improve yielding 2019-12-17 15:38:00 -06:00
Vexu f0c94d95dd
use @atomicStore in std lib 2019-11-13 00:52:15 +02:00
Andrew Kelley 2723ffc2b2
fixups and zig fmt 2019-11-08 01:52:23 -05:00
kprotty fe8c1cf804 missing `os` declaration 2019-11-07 17:14:08 -06:00
kprotty 12e68cbeb6 pthread_sched_yield -> sched_yield 2019-11-07 16:33:25 -06:00
kprotty f41e58d015 fix SpinLock.yield for pull/3626 2019-11-07 15:51:20 -06:00
kprotty b535e86cc0 move SpinLock definitions around 2019-11-07 15:32:20 -06:00
kprotty 4dbfc48ab3 Disable asm("yield") for arm in SpinLock.yieldCpu() because of CI 2019-11-05 16:16:03 -06:00
kprotty c9db420a09 Adaptive Mutex:
- uses std.ThreadParker
- supports static initialization (deprecates StaticallyInitializedMutex)
2019-11-05 16:14:43 -06:00
kprotty 14209cf615 make SpinLock.Backoff pub 2019-11-05 13:43:17 -06:00
kprotty 84e370d0b2 Move hybrid yielding into its own struct 2019-11-05 09:31:29 -06:00
kprotty 0d4f4aad9e adaptive SpinLock 2019-11-05 08:16:08 -06:00
Andrew Kelley ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00