From 320f21524ec3ab884372dc6ca4e1ce6356ad9302 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 12 Mar 2022 20:34:25 +0100 Subject: [PATCH] cgo: slightly improve error messages Updating them to libclang-13-dev was a good change, but we can go even further: * The suggestion didn't apply to MacOS. * The suggestion would need to be updated with every LLVM release, which is a maintenance burden. * The suggestion is wrong when compiling with `-tags=llvm12` for example to choose a different LLVM version. Therefore, link to the build documentation instead. --- cgo/libclang.go | 2 +- cgo/libclang_stubs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cgo/libclang.go b/cgo/libclang.go index 5a11601b..f0663794 100644 --- a/cgo/libclang.go +++ b/cgo/libclang.go @@ -16,7 +16,7 @@ import ( ) /* -#include // if this fails, install libclang-13-dev +#include // If this fails, libclang headers aren't available. Please take a look here: https://tinygo.org/docs/guides/build/ #include #include diff --git a/cgo/libclang_stubs.c b/cgo/libclang_stubs.c index f06eb2c3..2bc4451c 100644 --- a/cgo/libclang_stubs.c +++ b/cgo/libclang_stubs.c @@ -3,7 +3,7 @@ // are slightly different from the ones defined in libclang.go, but they // should be ABI compatible. -#include // if this fails, install libclang-13-dev +#include // If this fails, libclang headers aren't available. Please take a look here: https://tinygo.org/docs/guides/build/ CXCursor tinygo_clang_getTranslationUnitCursor(CXTranslationUnit tu) { return clang_getTranslationUnitCursor(tu);