Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Kelley
caddbbc315 build: avoid compiling self-hosted twice
build.zig: add a 'compile' step to compile the self-hosted compiler
without installing it.
Compilation: set cache mode to whole when using the LLVM backend and
--enable-cache is passed.

This makes `zig build` act the same as it does with stage1. Upside is
that a second invocation of `zig build` on an unmodified source tree
will avoid redoing the compilation again. Downside is that it will
proliferate more garbage in the project-local cache (same as stage1).

This can eventually be fixed when Zig's incremental compilation is more
robust; we can go back to having LLVM use CacheMode.incremental and rely
on it detecting no changes and avoiding doing the flush() step.
2022-10-18 16:52:43 -07:00
Eric Joldasov
1013212697 cmake: separate installing and building (again) 2022-10-18 16:52:43 -07:00
Andrew Kelley
56129d26eb cmake: build stage3 by default
This is a simplification of the cmake build script which introduces a
new "stage3" target that is built by default, which builds and installs
a stage3 zig.

It greatly simplifies the build instructions for Zig, making it conform
to the regular cmake routine, while still producing a stage3 artifact.
2022-08-28 17:07:21 -07:00
Andrew Kelley
20f3b0efff rename libuserland to libstage2 2020-02-16 19:16:08 -05:00
Andrew Kelley
7eb0a3edce
remove libc dependency of zig0 building libstage2
Rather than `zig0 build ...` the build now does
`zig0 build-lib ...`, avoiding the requirement of linking the build
script, and thus avoiding the requirement of finding native libc,
for systems where libc is the system ABI.
2020-02-16 18:57:34 -05:00
Michael Dusan
b9f4ac86ef
cmake: support make and make install
(2nd attempt to get this right)
2020-01-17 19:39:43 -05:00