authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-11 22:57:39-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-11 22:59:40-04:00
logff0b7fe29a49a5619b3c2f7fee0baccb979caf2d
treebd108b5c7de008bd3014650c80282c3a7ed45aee
parent014cc60a72ac2d64935bf424459b5fa13e281ed9
signaturelock-open Commit is signed but in an unrecognized format.

error messages for attempted cache when zig cannot perfectly do it


2 files changed, 12 insertions(+), 0 deletions(-)

src/analyze.cpp+6
...@@ -6289,6 +6289,12 @@ LinkLib *add_link_lib(CodeGen *g, Buf *name) {...@@ -6289,6 +6289,12 @@ LinkLib *add_link_lib(CodeGen *g, Buf *name) {
6289 if (is_libc && g->libc_link_lib != nullptr)6289 if (is_libc && g->libc_link_lib != nullptr)
6290 return g->libc_link_lib;6290 return g->libc_link_lib;
62916291
6292 if (g->enable_cache && is_libc && g->zig_target.os != OsMacOSX && g->zig_target.os != OsIOS) {
6293 fprintf(stderr, "TODO linking against libc is currently incompatible with `--cache on`.\n"
6294 "Zig is not yet capable of determining whether the libc installation has changed on subsequent builds.\n");
6295 exit(1);
6296 }
6297
6292 for (size_t i = 0; i < g->link_libs_list.length; i += 1) {6298 for (size_t i = 0; i < g->link_libs_list.length; i += 1) {
6293 LinkLib *existing_lib = g->link_libs_list.at(i);6299 LinkLib *existing_lib = g->link_libs_list.at(i);
6294 if (buf_eql_buf(existing_lib->name, name)) {6300 if (buf_eql_buf(existing_lib->name, name)) {
src/ir.cpp+6
...@@ -17961,6 +17961,12 @@ static ZigType *ir_analyze_instruction_type_name(IrAnalyze *ira, IrInstructionTy...@@ -17961,6 +17961,12 @@ static ZigType *ir_analyze_instruction_type_name(IrAnalyze *ira, IrInstructionTy
17961}17961}
1796217962
17963static ZigType *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstructionCImport *instruction) {17963static ZigType *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstructionCImport *instruction) {
17964 if (ira->codegen->enable_cache) {
17965 ir_add_error(ira, &instruction->base,
17966 buf_sprintf("TODO @cImport is incompatible with --cache on. The cache system currently is unable to detect subsequent changes in .h files."));
17967 return ira->codegen->builtin_types.entry_invalid;
17968 }
17969
17964 AstNode *node = instruction->base.source_node;17970 AstNode *node = instruction->base.source_node;
17965 assert(node->type == NodeTypeFnCallExpr);17971 assert(node->type == NodeTypeFnCallExpr);
17966 AstNode *block_node = node->data.fn_call_expr.params.at(0);17972 AstNode *block_node = node->data.fn_call_expr.params.at(0);