mirror of
https://github.com/ziglang/zig.git
synced 2025-02-10 22:50:18 +00:00
better error message when LLVM does not understand a triple
This commit is contained in:
parent
a0590bda29
commit
2b2bf53a49
@ -7553,7 +7553,13 @@ static void init(CodeGen *g) {
|
||||
LLVMTargetRef target_ref;
|
||||
char *err_msg = nullptr;
|
||||
if (LLVMGetTargetFromTriple(buf_ptr(&g->triple_str), &target_ref, &err_msg)) {
|
||||
zig_panic("unable to create target based on: %s", buf_ptr(&g->triple_str));
|
||||
fprintf(stderr,
|
||||
"Zig is expecting LLVM to understand this target: '%s'\n"
|
||||
"However LLVM responded with: \"%s\"\n"
|
||||
"Zig is unable to continue. This is a bug in Zig:\n"
|
||||
"https://github.com/ziglang/zig/issues/438\n"
|
||||
, buf_ptr(&g->triple_str), err_msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
bool is_optimized = g->build_mode != BuildModeDebug;
|
||||
|
Loading…
Reference in New Issue
Block a user