Commit fd5f03b0 authored by lovedheart's avatar lovedheart Committed by Chris Thurber

[llvm] Upgrade to 6.0.0 with pre-built binaries (#2194)

* [llvm] Upgrade to 6.0.0 with pre-built binaries
parent 1dace4cf
......@@ -2,37 +2,55 @@ require 'package'
class Llvm < Package
description 'The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.'
homepage 'https://llvm.org/'
version '5.0.1'
source_url 'https://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz'
source_sha256 '5fa7489fc0225b11821cab0362f5813a05f2bcf2533e8a4ea9c9c860168807b0'
homepage 'http://llvm.org/'
version '6.0.0'
source_url 'http://llvm.org/releases/6.0.0/llvm-6.0.0.src.tar.xz'
source_sha256 '1ff53c915b4e761ef400b803f07261ade637b0c269d99569f18040f3dcee4408'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-5.0.1-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-5.0.1-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-5.0.1-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-5.0.1-chromeos-x86_64.tar.xz',
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-6.0.0-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-6.0.0-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-6.0.0-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/llvm-6.0.0-chromeos-x86_64.tar.xz',
})
binary_sha256 ({
aarch64: 'cb7b3dd68b77003dd23855c9b561688add6c1ed4bf594cbcbb34dc810864099a',
armv7l: 'cb7b3dd68b77003dd23855c9b561688add6c1ed4bf594cbcbb34dc810864099a',
i686: '70391e63dfb43c3f7a9a19458317f594c548d69385fb3f4970cafbb3faa02058',
x86_64: '29a7a6cac33ff376a57fd4ac36cc50690255d6a8b2e2f46b7f0818bf942a9927',
aarch64: '9bfffb161e2e3c0642178175fe7ce2c18168c8ab71bce91e10ad4a15b80e3ea7',
armv7l: '9bfffb161e2e3c0642178175fe7ce2c18168c8ab71bce91e10ad4a15b80e3ea7',
i686: '4e3c4ee05546a808fadfbd7f388ce1f64e8daac72c1eaa7e396ed062c0c94328',
x86_64: 'e24785612a16133605fb93fb9fd43d663b3a1e69e6cb69e5c518f23dab8321a3',
})
depends_on 'cmake' => :build
def self.build
Dir.mkdir 'mybuilddir'
Dir.chdir "mybuilddir" do
system "cmake .. -DBUILD_SHARED_LIBS=true -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=ON"
system "cmake --build . -- -j#{CREW_NPROC}"
system "mkdir -p builddir"
Dir.chdir("builddir") do
case ARCH
when "x86_64"
system "cmake",
"-DCMAKE_INSTALL_PREFIX=#{CREW_PREFIX}",
"-DLLVM_LIBDIR_SUFFIX=64",
"-DBUILD_SHARED_LIBS=ON",
"-DCMAKE_BUILD_TYPE=Release",
"-DLLVM_TARGETS_TO_BUILD=host",
".."
else
system "cmake",
"-DCMAKE_INSTALL_PREFIX=#{CREW_PREFIX}",
"-DBUILD_SHARED_LIBS=ON",
"-DCMAKE_BUILD_TYPE=Release",
"-DLLVM_TARGETS_TO_BUILD=host",
".."
end
system "make"
end
end
def self.install
Dir.chdir "mybuilddir" do
system "cmake -DCMAKE_INSTALL_PREFIX=#{CREW_DEST_PREFIX} -P cmake_install.cmake"
def self.install
Dir.chdir("builddir") do
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment