Permalink
Browse files

package/llvm

  • Loading branch information...
mlang committed Nov 26, 2017
1 parent 82d9ac1 commit 19e8b458eac9d3bdc1fa26edaffd951bf9f152bb
Showing with 24 additions and 0 deletions.
  1. +24 −0 package/llvm/llvm.mk
View
@@ -0,0 +1,24 @@
LLVM_VERSION = 5.0.0
LLVM_SOURCE = llvm-$(LLVM_VERSION).src.tar.xz
LLVM_CFE_SOURCE = cfe-$(LLVM_VERSION).src.tar.xz
LLVM_SITE = http://releases.llvm.org/$(LLVM_VERSION)
LLVM_EXTRA_DOWNLOADS = $(LLVM_SITE)/$(LLVM_CFE_SOURCE)
LLVM_SUPPORTS_IN_SOURCE_BUILD = NO
LLVM_DEPENDENCIES = host-llvm
LLVM_CONF_OPTS = -DCMAKE_CROSSCOMPILING=On \
-DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen \
-DCLANG_TABLEGEN=$(HOST_LLVM_BUILDDIR)/bin/clang-tblgen
define LLVM_CFE_EXTRACT
mkdir $(@D)/tools/clang
$(call suitable-extractor,$(LLVM_CFE_SOURCE)) $(DL_DIR)/$(LLVM_CFE_SOURCE) | \
$(TAR) --strip-components=1 -C $(@D)/tools/clang $(TAR_OPTIONS) -
endef
HOST_LLVM_POST_EXTRACT_HOOKS += LLVM_CFE_EXTRACT
LLVM_POST_EXTRACT_HOOKS += LLVM_CFE_EXTRACT
$(eval $(host-cmake-package))
$(eval $(cmake-package))

0 comments on commit 19e8b45

Please sign in to comment.