From 79fb48601749f93541800cff82f3506931dd433c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 23 Jan 2020 17:28:13 -0500 Subject: link: update to llvm 10 API --- src/link.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/link.cpp') diff --git a/src/link.cpp b/src/link.cpp index 61a5ad5664..efb60976cb 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1894,9 +1894,14 @@ static void link_diag_callback(void *context, const char *ptr, size_t len) { buf_append_mem(diag, ptr, len); } -static bool zig_lld_link(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_count, Buf *diag) { +static bool zig_lld_link(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_count, + Buf *diag) +{ + Buf *stdout_diag = buf_alloc(); buf_resize(diag, 0); - return ZigLLDLink(oformat, args, arg_count, link_diag_callback, diag); + bool result = ZigLLDLink(oformat, args, arg_count, link_diag_callback, stdout_diag, diag); + buf_destroy(stdout_diag); + return result; } static void add_uefi_link_args(LinkJob *lj) { -- cgit v1.2.3