summaryrefslogtreecommitdiff
path: root/lang/libLLVM/options.mk
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2016-03-08 21:06:50 +0000
committertnn <tnn@pkgsrc.org>2016-03-08 21:06:50 +0000
commitec3fc86de5bb55df1ef3748891ec401716592c9b (patch)
tree0e86234b9070b332d3d06597d42440c7d97474b0 /lang/libLLVM/options.mk
parent4196bc0599a8089709723326978aaf2e90d60b2d (diff)
downloadpkgsrc-ec3fc86de5bb55df1ef3748891ec401716592c9b.tar.gz
update to libLLVM-3.8.0
Decouple the package from lang/clang that so it can be maintained and updated independently. This switches the build framework from autoconf to cmake. There are no significant changes to the AMDGPU target mentioned in the release notes. Other changes are not relevant to mention here since mesa is the only user of this package in pkgsrc proper.
Diffstat (limited to 'lang/libLLVM/options.mk')
-rw-r--r--lang/libLLVM/options.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/lang/libLLVM/options.mk b/lang/libLLVM/options.mk
new file mode 100644
index 00000000000..108fabc0e58
--- /dev/null
+++ b/lang/libLLVM/options.mk
@@ -0,0 +1,39 @@
+# $NetBSD: options.mk,v 1.1 2016/03/08 21:06:50 tnn Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.llvm
+
+LLVM_TARGETS= AArch64 AMDGPU ARM BPF CppBackend Hexagon MSP430 Mips NVPTX PowerPC Sparc SystemZ X86 XCore
+
+.for tgt in ${LLVM_TARGETS}
+PLIST_VARS+= ${tgt}
+PKG_SUPPORTED_OPTIONS+= llvm-target-${tgt:tl}
+.endfor
+
+# Probably safe to assume that only x86 users are interested in
+# cross-compilation for now. This saves some build time for everyone else.
+.if !empty(MACHINE_ARCH:Msparc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-sparc
+.elif !empty(MACHINE_ARCH:Mpowerpc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-powerpc
+.elif !empty(MACHINE_ARCH:Mearm*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-arm
+.elif !empty(MACHINE_ARCH:M*mips*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-mips
+.else
+# X86 and everyone else get all targets by default.
+. for tgt in ${LLVM_TARGETS}
+PKG_SUGGESTED_OPTIONS+= llvm-target-${tgt:tl}
+. endfor
+.endif
+PKG_SUGGESTED_OPTIONS+= llvm-target-amdgpu # for mesa/radeon
+
+.include "../../mk/bsd.options.mk"
+
+.for tgt in ${LLVM_TARGETS}
+. if !empty(PKG_OPTIONS:Mllvm-target-${tgt:tl})
+PLIST.${tgt}= yes
+LLVM_TARGETS_TO_BUILD+= ${tgt}
+. endif
+.endfor
+
+CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS_TO_BUILD:ts;}"