Skip to content

Commit 7d45d71

Browse files
author
Brian J. Cardiff
authored
Merge pull request #41 from crystal-lang/omnibus-llvm6
Build LLVM in CI and upgrade to llvm 6.0.1 in omnibus
2 parents 34f76b4 + 012211a commit 7d45d71

File tree

3 files changed

+72
-8
lines changed

3 files changed

+72
-8
lines changed

.circleci/config.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
3+
jobs:
4+
omnibus_osx_llvm:
5+
macos:
6+
xcode: "9.0"
7+
environment:
8+
LLVM_VERSION: 6.0.1
9+
MACOSX_DEPLOYMENT_TARGET: 10.11
10+
shell: /bin/bash --login -eo pipefail
11+
steps:
12+
- run:
13+
name: Setup environment
14+
command: |
15+
brew update
16+
brew install pkgconfig libtool cmake
17+
18+
sudo mkdir -p /opt/llvm
19+
sudo chown $(whoami) /opt/llvm/
20+
sudo mkdir -p /var/cache
21+
sudo chown $(whoami) /var/cache
22+
- checkout
23+
- run:
24+
no_output_timeout: 140m
25+
name: Build LLVM
26+
command: |
27+
cd omnibus
28+
bundle check || bundle install --binstubs
29+
bundle exec omnibus build llvm
30+
- store_artifacts:
31+
path: ./omnibus/pkg
32+
destination: llvm
33+
34+
workflows:
35+
version: 2
36+
37+
build_llvm:
38+
jobs:
39+
- omnibus_osx_llvm:
40+
filters:
41+
branches:
42+
only:
43+
- /.*\bbuild-llvm\b.*/

omnibus/config/software/llvm.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
name "llvm"
2-
default_version "3.9.1"
2+
LLVM_VERSION = (ENV['LLVM_VERSION'] || "6.0.1").strip
3+
default_version LLVM_VERSION
34

4-
source :url => "http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz",
5-
:md5 => "3259018a7437e157f3642df80f1983ea"
5+
source url: "http://releases.llvm.org/#{version}/llvm-#{version}.src.tar.xz"
6+
7+
version "3.9.1" do
8+
source md5: "3259018a7437e157f3642df80f1983ea"
9+
end
10+
11+
version "6.0.1" do
12+
source md5: "c88c98709300ce2c285391f387fecce0"
13+
end
614

715
relative_path "llvm-#{version}.src"
816

omnibus/config/software/llvm_bin.rb

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
name "llvm_bin"
2-
default_version "3.9.1-1"
2+
LLVM_VERSION = (ENV['LLVM_VERSION'] || "6.0.1").strip
3+
default_version "#{LLVM_VERSION}-1"
34

45
if linux?
5-
if _64_bit?
6-
source_md5 = "cedaa626e3959b5ab467467e6dfb91fe"
6+
case LLVM_VERSION
7+
when "3.9.1"
8+
if _64_bit?
9+
source_md5 = "cedaa626e3959b5ab467467e6dfb91fe"
10+
else
11+
source_md5 = "8b847e903163054196d3854122363b8b"
12+
end
713
else
8-
source_md5 = "8b847e903163054196d3854122363b8b"
14+
raise "llvm_bin #{LLVM_VERSION} not supported on linux"
915
end
1016
elsif mac_os_x? && _64_bit?
11-
source_md5 = "9fb52b6a648e700f431b459586eb5403"
17+
case LLVM_VERSION
18+
when "3.9.1"
19+
source_md5 = "9fb52b6a648e700f431b459586eb5403"
20+
when "6.0.1"
21+
source_md5 = "435beaff5e309921f4d87c275cad4e03"
22+
else
23+
raise "llvm_bin #{LLVM_VERSION} not supported on osx"
24+
end
1225
end
1326

1427
source url: "http://crystal-lang.s3.amazonaws.com/llvm/llvm-#{version}-#{ohai['os']}-#{ohai['kernel']['machine']}.tar.gz",

0 commit comments

Comments
 (0)