mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
error messages for attempted cache when zig cannot perfectly do it
This commit is contained in:
parent
014cc60a72
commit
ff0b7fe29a
@ -6289,6 +6289,12 @@ LinkLib *add_link_lib(CodeGen *g, Buf *name) {
|
||||
if (is_libc && g->libc_link_lib != nullptr)
|
||||
return g->libc_link_lib;
|
||||
|
||||
if (g->enable_cache && is_libc && g->zig_target.os != OsMacOSX && g->zig_target.os != OsIOS) {
|
||||
fprintf(stderr, "TODO linking against libc is currently incompatible with `--cache on`.\n"
|
||||
"Zig is not yet capable of determining whether the libc installation has changed on subsequent builds.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < g->link_libs_list.length; i += 1) {
|
||||
LinkLib *existing_lib = g->link_libs_list.at(i);
|
||||
if (buf_eql_buf(existing_lib->name, name)) {
|
||||
|
||||
@ -17961,6 +17961,12 @@ static ZigType *ir_analyze_instruction_type_name(IrAnalyze *ira, IrInstructionTy
|
||||
}
|
||||
|
||||
static ZigType *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstructionCImport *instruction) {
|
||||
if (ira->codegen->enable_cache) {
|
||||
ir_add_error(ira, &instruction->base,
|
||||
buf_sprintf("TODO @cImport is incompatible with --cache on. The cache system currently is unable to detect subsequent changes in .h files."));
|
||||
return ira->codegen->builtin_types.entry_invalid;
|
||||
}
|
||||
|
||||
AstNode *node = instruction->base.source_node;
|
||||
assert(node->type == NodeTypeFnCallExpr);
|
||||
AstNode *block_node = node->data.fn_call_expr.params.at(0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user