aboutsummaryrefslogtreecommitdiff
path: root/src/libc_installation.zig
AgeCommit message (Collapse)Author
2024-02-27move `zig libc` command to be lazily builtAndrew Kelley
part of #19063 This is a prerequisite for doing the same for Resinator.
2024-02-24Fix handling of Windows (WTF-16) and WASI (UTF-8) pathsRyan Liptak
Windows paths now use WTF-16 <-> WTF-8 conversion everywhere, which is lossless. Previously, conversion of ill-formed UTF-16 paths would either fail or invoke illegal behavior. WASI paths must be valid UTF-8, and the relevant function calls have been updated to handle the possibility of failure due to paths not being encoded/encodable as valid UTF-8. Closes #18694 Closes #1774 Closes #2565
2024-01-01std.Target.Query: remove deprecated APIAndrew Kelley
These functions have been doomed for a long time. Finally I figured out what the proper relationship between this API and std.Target is.
2024-01-01rename std.zig.CrossTarget to std.Target.QueryAndrew Kelley
2023-10-22child_process + Build: rename exec to run + all related codeJan Philipp Hafer
Justification: exec, execv etc are unix concepts and portable version should be called differently. Do no touch non-Zig code. Adjust error names as well, if associated. Closes #5853.
2023-10-17rework zig envAndrew Kelley
Introduce introspect.EnvVar which tracks all the environment variables that are observed by the compiler, so that we can print them with `zig env`. The `zig env` command now prints both the resolved values as well as all the possibly observed environment variables.
2023-10-02Add illumos OS tagStephen Gregoratto
- Adds `illumos` to the `Target.Os.Tag` enum. A new function, `isSolarish` has been added that returns true if the tag is either Solaris or Illumos. This matches the naming convention found in Rust's `libc` crate[1]. - Add the tag wherever `.solaris` is being checked against. - Check for the C pre-processor macro `__illumos__` in CMake to set the proper target tuple. Illumos distros patch their compilers to have this in the "built-in" set (verified with `echo | cc -dM -E -`). Alternatively you could check the output of `uname -o`. Right now, both Solaris and Illumos import from `c/solaris.zig`. In the future it may be worth putting the shared ABI bits in a base file, and mixing that in with specific `c/solaris.zig`/`c/illumos.zig` files. [1]: https://github.com/rust-lang/libc/tree/6e02a329a2a27f6887ea86952f389ca11e06448c/src/unix/solarish
2023-09-30solaris: hard-code native libc pathsRyan Zezeski
On illumos (and Solaris) there is, by design, only one libc.
2023-08-29darwin: move inference of SDK version into the linkerJakub Konka
`std.zig.system.darwin.getSdk` now pulls only the SDK path so we execute a child process only once and not twice as it was until now since we parse the SDK version directly from the pulled path. This is actually how `ld64` does it too.
2023-08-03std.zig.system.darwin: fix redundant namesAndrew Kelley
2023-08-03zig libc: restore functionality on macOSAndrew Kelley
Regressed in 2006add8496c47804ee3b6c562f420871cb4ea0a. References to native_darwin_sdk are no longer kept in the frontend. Instead the darwin SDK is detected as part of NativePaths and as part of LibCInstallation.
2023-08-03LibCInstallation: no longer depends on LLVMAndrew Kelley
Reverts 4fa8cc736966544da381c90a6111158179fc550b. This check was added because it depended on C++ code, but after 77b96231a6bc195cc482d05599e8c20ee01645a6, this functionality no longer depends on C++ code.
2023-07-23src/windows_sdk.cpp: port to ZigEric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-05-13Update all std.mem.split calls to their appropriate functionRyan Liptak
Everywhere that can now use `splitScalar` should get a nice little performance boost.
2023-05-13Update all std.mem.tokenize calls to their appropriate functionRyan Liptak
Everywhere that can now use `tokenizeScalar` should get a nice little performance boost.
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2022-11-29std.mem.Allocator: allow shrink to failAndrew Kelley
closes #13535
2022-11-05Merge pull request #13101 from alichraghi/o4Andrew Kelley
2022-11-04all: rename i386 to x86Ali Chraghi
2022-11-03libc: add support for arm64 msvc installationJakub Konka
2022-07-25std.mem: add `first` method to `SplitIterator` and `SplitBackwardsIterator`r00ster
2022-04-02stage2: remove dependencies on async functionsAndrew Kelley
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-02-06Avoid depending on child process execution when not supported by host OSCody Tapscott
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
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-30std lib API deprecations for the upcoming 0.9.0 releaseAndrew Kelley
See #3811
2021-11-25Skip detecting native libc dirs on darwinJakub Konka
This is handled before by detecting and adding SDK path which is a centralised point for the native libc installation on darwin.
2021-11-15update compilation includes for haikuAl Hoang
2021-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-09-24Initial bringup of the Solaris/Illumos portStephen Gregoratto
2021-09-07Fix libc file to check against compilation target instead of native (#9670)Martin Wickham
2021-09-01stage2: update for new usingnamespace semanticsAndrew Kelley
2021-08-06Update all usages of mem.split/mem.tokenize for generic versionRyan Liptak
2021-06-09native libc detection: respect spaces in CC env varAndrew Kelley
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-03Breaking hash map changes for 0.8.0Martin Wickham
- 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-05-24stage2: remove dead code; rename crtbegin_dir to gcc_dirAndrew Kelley
2021-05-24update compilation and elf link for haiku caseAl Hoang
* 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-24make "gnu" (mingw-w64) the default C ABI on WindowsAndrew Kelley
Closes #6565
2021-05-23housekeeping: remove `pub` from ccPrintFileName()Michael Dusan
- this was inadvertently made public while iterating on #8730
2021-05-23overhaul elf csu (c-runtime startup) logicMichael Dusan
- 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-20Run `zig fmt` on src/ and lib/std/Isaac Freund
This replaces callconv(.Inline) with the more idiomatic inline keyword.
2021-05-17stage2: update `@import("builtin")` API usageAndrew Kelley
2021-04-23header path detection for haikuAl Hoang
2021-02-25initial support for haiku sync updateAl Hoang
* add cpu count * use haiku find_directory * add definitions and exports for building in haiku
2021-01-07Reduce use of deprecated IO typesJay Petacat
Related: #4917
2021-01-06std: Rename ArrayList shrink => shrinkAndFreeAlex Cameron
2021-01-02stage2: Use {s} instead of {} when formatting stringsLemonBoy
2020-11-18Merge pull request #7005 from jshholland/deprecate-spanVeikka Tuominen
Remove ArrayList.span
2020-11-07remove deprecated uses of ArrayList.spanJosh Holland
2020-11-06remove outdated commentxackus
2020-10-11add minimal openbsd supportSébastien Marie