summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2021-12-22 12:47:20 +0000
committertnn <tnn@pkgsrc.org>2021-12-22 12:47:20 +0000
commit64a5558567932a0cc359e5fe5c3bc4c1b4349568 (patch)
treee772e30689af28130b5a91a34ade5785356aa250 /lang
parenteea3d5120f22042871a927c7ad517a5f31d7ffd1 (diff)
downloadpkgsrc-64a5558567932a0cc359e5fe5c3bc4c1b4349568.tar.gz
wasi-libc: set CLANGBASE instead of PKG_CC/CXX
Otherwise it breaks when user has CLANGBASE=/usr in mk.conf. Also set PKG_FAIL_REASON when llvm doesn't have llvm-target-webassembly.
Diffstat (limited to 'lang')
-rw-r--r--lang/wasi-libc/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/lang/wasi-libc/Makefile b/lang/wasi-libc/Makefile
index 4cfe25f90de..ab0757a8f6a 100644
--- a/lang/wasi-libc/Makefile
+++ b/lang/wasi-libc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2021/12/19 13:38:56 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2021/12/22 12:47:20 tnn Exp $
GITHUB_PROJECT= wasi-libc
GITHUB_TAG= ad5133410f66b93a2381db5b542aad5e0964db96
@@ -36,10 +36,12 @@ MAKE_FLAGS+= INSTALL_DIR=${DESTDIR}${PREFIX}/wasi
BUILD_TARGET= finish
PKGSRC_COMPILER= clang
-PKG_CC= ${PREFIX}/bin/clang
-PKG_CXX= ${PREFIX}/bin/clang++
+CLANGBASE= ${PREFIX}
BUILDLINK_DEPMETHOD.clang= build
.include "../../lang/clang/buildlink3.mk"
BUILDLINK_DEPMETHOD.llvm= build
.include "../../lang/llvm/buildlink3.mk"
+.if empty(PKG_BUILD_OPTIONS.llvm:Mllvm-target-webassembly)
+PKG_FAIL_REASON+= "llvm-target-webassembly PKG_OPTION must be enabled in lang/llvm"
+.endif
.include "../../mk/bsd.pkg.mk"