Mercurial > mxe-octave
comparison src/llvm.mk @ 5489:0e70b5b31362
Update LLVM to v7.0.0 (bug #58689).
* src/llvm.mk: Update version, checksum and download url. Update build rule.
Install (native) llvm-config.
* src/mingw-llvm-1-config.patch: Patch llvm-config so also the native version
returns the settings that are needed for a cross build.
* dist-files.mk: Add new patch to list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 05 Jul 2020 20:57:50 +0200 |
parents | 9ececb9d5f4e |
children | 50478c969620 |
comparison
equal
deleted
inserted
replaced
5488:005f1b76cbab | 5489:0e70b5b31362 |
---|---|
1 # This file is part of MXE. | 1 # This file is part of MXE. |
2 # See index.html for further information. | 2 # See index.html for further information. |
3 | 3 |
4 PKG := llvm | 4 PKG := llvm |
5 $(PKG)_IGNORE := | 5 $(PKG)_IGNORE := |
6 $(PKG)_VERSION := 6.0.1 | 6 $(PKG)_VERSION := 7.0.0 |
7 $(PKG)_CHECKSUM := 09a6316c5225cab255ba12391e7abe5ff4d28935 | 7 $(PKG)_CHECKSUM := 27503a22614626e935a05b609ab4211be72cd78b |
8 $(PKG)_SUBDIR := llvm-$($(PKG)_VERSION).src | 8 $(PKG)_SUBDIR := llvm-$($(PKG)_VERSION).src |
9 $(PKG)_FILE := llvm-$($(PKG)_VERSION).src.tar.xz | 9 $(PKG)_FILE := llvm-$($(PKG)_VERSION).src.tar.xz |
10 $(PKG)_URL := http://releases.llvm.org/$($(PKG)_VERSION)/$($(PKG)_FILE) | 10 $(PKG)_URL := https://releases.llvm.org/$($(PKG)_VERSION)/$($(PKG)_FILE) |
11 $(PKG)_DEPS := | 11 $(PKG)_DEPS := |
12 | 12 |
13 define $(PKG)_UPDATE | 13 define $(PKG)_UPDATE |
14 wget -q -O- 'http://releases.llvm.org/download.html?' | \ | 14 wget -q -O- 'http://releases.llvm.org/download.html?' | \ |
15 grep 'Download LLVM' | \ | 15 grep 'Download LLVM' | \ |
58 endif | 58 endif |
59 ifeq ($(USE_CCACHE),yes) | 59 ifeq ($(USE_CCACHE),yes) |
60 $(PKG)_CCACHE_OPTIONS += \ | 60 $(PKG)_CCACHE_OPTIONS += \ |
61 -DLLVM_CCACHE_BUILD=On | 61 -DLLVM_CCACHE_BUILD=On |
62 endif | 62 endif |
63 # build cross-compiler | 63 |
64 define $(PKG)_BUILD | 64 define $(PKG)_BUILD |
65 mkdir '$(1)/.build' | 65 mkdir '$(1)/.build' |
66 cd '$(1)/.build' && 'cmake' .. \ | 66 cd '$(1)/.build' && 'cmake' .. \ |
67 $($(PKG)_CMAKE_FLAGS) \ | 67 $($(PKG)_CMAKE_FLAGS) \ |
68 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ | 68 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ |
86 -DLLVM_ENABLE_SPHINX=OFF \ | 86 -DLLVM_ENABLE_SPHINX=OFF \ |
87 -DLLVM_BUILD_RUNTIME=OFF \ | 87 -DLLVM_BUILD_RUNTIME=OFF \ |
88 -DLLVM_BUILD_RUNTIMES=OFF \ | 88 -DLLVM_BUILD_RUNTIMES=OFF \ |
89 -DLLVM_INCLUDE_RUNTIMES=OFF \ | 89 -DLLVM_INCLUDE_RUNTIMES=OFF \ |
90 $($(PKG)_CCACHE_OPTIONS) | 90 $($(PKG)_CCACHE_OPTIONS) |
91 $(MAKE) -C '$(1)/.build' -j $(JOBS) llvm-tblgen | 91 |
92 $(MAKE) -C '$(1)/.build' -j $(JOBS) LLVMSupport | |
93 $(MAKE) -C '$(1)/.build' -j $(JOBS) llvm-config | |
92 $(MAKE) -C '$(1)/.build' -j $(JOBS) install DESTDIR='$(3)' | 94 $(MAKE) -C '$(1)/.build' -j $(JOBS) install DESTDIR='$(3)' |
95 | |
96 # create symlink for shared library so that llvm-config can find it | |
97 cd '$(3)/$(HOST_BINDIR)' && ln -s LLVM.dll LLVM-$(word 1,$(subst ., ,$($(PKG)_VERSION))).dll | |
98 | |
99 # install native llvm-config in HOST_BINDIR because it won't find the libs otherwise | |
100 # FIXME: Some of the configuration flags are hard coded into llvm-config with a patch. | |
101 # If the configuration flags are changed, the patch might have to be adapted. | |
102 $(INSTALL) -d '$(HOST_BINDIR)' | |
103 $(INSTALL) -m755 '$(1)/.build/NATIVE/bin/llvm-config' '$(HOST_BINDIR)/$(MXE_TOOL_PREFIX)llvm-config' | |
93 endef | 104 endef |
94 endif | 105 endif |