move some of the installation from cmake to zig build

This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.

On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".

After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.

This closes #2874.

It also closes #2585. `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
This commit is contained in:
Andrew Kelley
2019-07-14 03:06:20 -04:00
parent 7d9ee5d6d5
commit 6096dc5f94
13 changed files with 414 additions and 6582 deletions

View File

@@ -305,14 +305,12 @@ int main(int argc, char **argv) {
Error err;
if (argc == 2 && strcmp(argv[1], "BUILD_INFO") == 0) {
printf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
printf("%s\n%s\n%s\n%s\n%s\n%s\n",
ZIG_CMAKE_BINARY_DIR,
ZIG_CXX_COMPILER,
ZIG_LLVM_CONFIG_EXE,
ZIG_LLD_INCLUDE_PATH,
ZIG_LLD_LIBRARIES,
ZIG_STD_FILES,
ZIG_C_HEADER_FILES,
ZIG_DIA_GUIDS_LIB);
return 0;
}