From 0d4db8828a9efc05b5c3622098a8337de0b62d1e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 25 Feb 2019 14:03:36 -0500 Subject: `@cImport` works with `--cache on` We pass -MD -MF args to clang when doing `@cImport`, which gives us a complete list of files that the C code read from. Then we add these to the cache. So even when using `@cImport` Zig's caching system remains perfect. This is a proof of concept for the mechanism that the self-hosted compiler will use to watch and rebuild files. --- src/error.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/error.cpp') diff --git a/src/error.cpp b/src/error.cpp index 9e01a86d8c..c81cfd1683 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -36,6 +36,7 @@ const char *err_str(Error err) { case ErrorCacheUnavailable: return "cache unavailable"; case ErrorPathTooLong: return "path too long"; case ErrorCCompilerCannotFindFile: return "C compiler cannot find file"; + case ErrorReadingDepFile: return "failed to read .d file"; } return "(invalid error)"; } -- cgit v1.2.3