aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.cpp
AgeCommit message (Collapse)Author
2020-01-15stage1: move local native_libc.txt to globalMichael Dusan
Automatic creation of `native_libc.txt` now occurs only in global cache. Manual creation/placement into local cache is supported. closes #3975
2019-11-02stage1: add linux XDG Base Directory supportMichael Dusan
- define zig global cache based on XDG spec: if env XDG_CACHE_HOME { "$XDG_CACHE_HOME/zig" } else { "$HOME/.cache/zig" } - old definition "$HOME/.local/share/zig" is retired - closes #3573
2019-09-26zig additionally looks for lib/std/std.zigAndrew Kelley
previously zig would search up directory parents for lib/zig/std/std.zig. It still does that, but now it also accepts lib/std/std.zig. This will probably be how we start shipping windows .zip files, since the extra directory is pointless. It also means you can run zig binaries from subdirectories of the zig source tree without lib files being installed.
2019-07-07ability to target any glibc versionAndrew Kelley
2019-04-16stage1 is now a hybrid of C++ and ZigAndrew Kelley
This modifies the build process of Zig to put all of the source files into libcompiler.a, except main.cpp and userland.cpp. Next, the build process links main.cpp, userland.cpp, and libcompiler.a into zig1. userland.cpp is a shim for functions that will later be replaced with self-hosted implementations. Next, the build process uses zig1 to build src-self-hosted/stage1.zig into libuserland.a, which does not depend on any of the things that are shimmed in userland.cpp, such as translate-c. Finally, the build process re-links main.cpp and libcompiler.a, except with libuserland.a instead of userland.cpp. Now the shims are replaced with .zig code. This provides all of the Zig standard library to the stage1 C++ compiler, and enables us to move certain things to userland, such as translate-c. As a proof of concept I have made the `zig zen` command use text defined in userland. I added `zig translate-c-2` which is a work-in-progress reimplementation of translate-c in userland, which currently calls `std.debug.panic("unimplemented")` and you can see the stack trace makes it all the way back into the C++ main() function (Thanks LemonBoy for improving that!). This could potentially let us move other things into userland, such as hashing algorithms, the entire cache system, .d file parsing, pretty much anything that libuserland.a itself doesn't need to depend on. This can also let us have `zig fmt` in stage1 without the overhead of child process execution, and without the initial compilation delay before it gets cached. See #1964
2019-03-27fix build on arm64Shawn Landden
2019-03-11stage1 caching system: detect problematic mtimesAndrew Kelley
closes #2045
2019-03-05build libunwind.a from source and link itAndrew Kelley
2019-03-05dynamic linker path is independent from libc installationAndrew Kelley
2019-03-02rename std lib files to new conventionAndrew Kelley
2018-09-17remove `zig build --init`. add `zig init-lib` and `zig init-exe`Andrew Kelley
init-lib creates a working static library with tests, and init-exe creates a working hello world with a `run` target. both now have test coverage with the new "cli tests" file. closes #1035
2018-09-10stage1 caching: zig no longer uses zig-cacheAndrew Kelley