31 Commits

Author SHA1 Message Date
r00ster
cff5d9c805
std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
Andrew Kelley
3432e66faf stage2: remove dependencies on async functions
This commit removes the tiny amount of dependency on async/await that
the self-hosted compiler has so that it can self-host before async/await
language features are working.
2022-04-02 19:18:41 -07:00
Cody Tapscott
5065830aa0 Avoid depending on child process execution when not supported by host OS
In accordance with the requesting issue (#10750):
- `zig test` skips any tests that it cannot spawn, returning success
- `zig run` and `zig build` exit with failure, reporting the command the cannot be run
- `zig clang`, `zig ar`, etc. already punt directly to the appropriate clang/lld main(), even before this change
- Native `libc` Detection is not supported

Additionally, `exec()` and related Builder functions error at run-time, reporting the command that cannot be run
2022-02-06 22:21:46 -07:00
Lee Cannon
85de022c56
allocgate: std Allocator interface refactor 2021-11-30 23:32:47 +00:00
Andrew Kelley
902df103c6 std lib API deprecations for the upcoming 0.9.0 release
See #3811
2021-11-30 00:13:07 -07:00
Jakub Konka
4270f234db Skip detecting native libc dirs on darwin
This is handled before by detecting and adding SDK path which
is a centralised point for the native libc installation on darwin.
2021-11-25 12:19:16 +01:00
Al Hoang
406baf4b12 update compilation includes for haiku 2021-11-15 00:29:26 -06:00
Andrew Kelley
6115cf2240 migrate from std.Target.current to @import("builtin").target
closes #9388
closes #9321
2021-10-04 23:48:55 -07:00
Stephen Gregoratto
87fd502fb6 Initial bringup of the Solaris/Illumos port 2021-09-24 14:06:16 -04:00
Martin Wickham
3d5ff91441
Fix libc file to check against compilation target instead of native (#9670) 2021-09-07 15:11:28 -04:00
Andrew Kelley
e41e75a486 stage2: update for new usingnamespace semantics 2021-09-01 17:54:07 -07:00
Ryan Liptak
d31352ee85 Update all usages of mem.split/mem.tokenize for generic version 2021-08-06 02:01:47 -07:00
Andrew Kelley
d128ec39df native libc detection: respect spaces in CC env var
Zig has detection for when it is accidentally being called recursively
when trying to find the native libc installation. However it was not
working, resulting in a cryptic failure, because zig tried to execute
a command which had spaces in it rather than tokenizing it.

This improves the user experience of `zig cc` for systems that Zig
does not support cross-compiling for.

Closes #8960
2021-06-09 17:26:58 -04:00
Martin Wickham
fc9430f567 Breaking hash map changes for 0.8.0
- hash/eql functions moved into a Context object
- *Context functions pass an explicit context
- *Adapted functions pass specialized keys and contexts
- new getPtr() function returns a pointer to value
- remove functions renamed to fetchRemove
- new remove functions return bool
- removeAssertDiscard deleted, use assert(remove(...)) instead
- Keys and values are stored in separate arrays
- Entry is now {*K, *V}, the new KV is {K, V}
- BufSet/BufMap functions renamed to match other set/map types
- fixed iterating-while-modifying bug in src/link/C.zig
2021-06-03 17:02:16 -05:00
Andrew Kelley
156b968ad8 stage2: remove dead code; rename crtbegin_dir to gcc_dir 2021-05-24 10:41:59 -07:00
Al Hoang
5280ea5d22 update compilation and elf link for haiku case
* for some reason part of the linkable bits for the crt libraries
  are split in different locations for haiku. this changeset
  accomodates this situation (crtbegin_dir lookup)
2021-05-24 10:39:02 -07:00
Andrew Kelley
609207801a make "gnu" (mingw-w64) the default C ABI on Windows
Closes #6565
2021-05-24 00:13:54 -04:00
Michael Dusan
b3e4832240 housekeeping: remove pub from ccPrintFileName()
- this was inadvertently made public while iterating on #8730
2021-05-23 19:45:05 -04:00
Michael Dusan
0f26120377 overhaul elf csu (c-runtime startup) logic
- more support for linux, android, freebsd, netbsd, openbsd, dragonfly
- centralize musl utils; musl logic is no longer intertwined with csu
- fix musl compilation to build crti/crtn for full archs list
- fix openbsd to support `zig build-lib -dynamic`
- initial dragonfly linking success (with a warning)

ancillary:

- fix emutls (openbsd) tests to use `try`
2021-05-23 15:38:57 -04:00
Isaac Freund
5b850d5c92
Run zig fmt on src/ and lib/std/
This replaces callconv(.Inline) with the more idiomatic inline keyword.
2021-05-20 17:14:18 +02:00
Andrew Kelley
5cacc446c4 stage2: update @import("builtin") API usage 2021-05-17 17:39:26 -07:00
Al Hoang
7a78b92fa0 header path detection for haiku 2021-04-23 23:37:35 -05:00
Al Hoang
c17396691c initial support for haiku sync update
* add cpu count
* use haiku find_directory
* add definitions and exports for building in haiku
2021-02-25 16:41:42 -07:00
Jay Petacat
a9b505fa77 Reduce use of deprecated IO types
Related: #4917
2021-01-07 23:48:58 -08:00
Alex Cameron
89286376c6 std: Rename ArrayList shrink => shrinkAndFree 2021-01-06 00:55:51 +11:00
LemonBoy
1c13ca5a05 stage2: Use {s} instead of {} when formatting strings 2021-01-02 17:12:57 -07:00
Veikka Tuominen
6d5b76a75d
Merge pull request #7005 from jshholland/deprecate-span
Remove ArrayList.span
2020-11-18 13:14:48 +02:00
Josh Holland
c25b157dda remove deprecated uses of ArrayList.span 2020-11-07 11:15:44 +00:00
xackus
c9fa57541b remove outdated comment 2020-11-06 22:58:58 +01:00
Sébastien Marie
f33a610c84 add minimal openbsd support 2020-10-11 08:23:36 +00:00
Andrew Kelley
528832bd3a rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00