Skip to content

Commit

Permalink
Merge pull request #113 from ethereum/build-llvm
Browse files Browse the repository at this point in the history
Build LLVM better
  • Loading branch information
chfast authored Feb 27, 2017
2 parents 3c13fff + 1a9e1e1 commit 7aef50d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Convenient binary output and build dirs
/bin/
/build/
/downloads/
/deps/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ branches:
os:
- linux
- osx
dist: trusty # cmake 3.2
osx_image: xcode7.3 # OSX 10.11, cmake 3.5
dist: trusty
osx_image: xcode8.2 # OSX 10.12, cmake 3.5
env:
global:
secure: "g3Ij6YqiOl/RaD3mdSHestkTDm49JPcJ90EbpFPfykkLZVAmZn6PP4WDvhBV9zcy4kUkERQs+8lj88wzw4JidxtT67WQBd/Lnvl06c+B1AB5jwoK9X5MKaOGvtXA18P8412rhB4a+1xFILuvM+2e74QUEPBV6tPlqZg9QZ9jwso="
Expand All @@ -16,8 +16,8 @@ env:
- BUILD_TYPE=Debug
cache:
ccache: true
directories: build/llvm

directories:
- deps

script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/install_cmake.sh; fi
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ configuration:
- Debug
- Release
cache:
- build/llvm -> cmake/llvm.cmake
- build/deps/downloads
- build/deps/llvm -> cmake/llvm.cmake
before_build: |
if not exist build mkdir build
cd build
Expand Down
3 changes: 1 addition & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ dependencies:
- scripts/install_cmake.sh
- PATH=~/.local/bin:$PATH BUILD_TYPE=RelWithDebInfo scripts/build.sh
cache_directories:
# TODO: add ccache
- build/llvm # Cache llvm build
- deps # Cache llvm build
- ~/.local

test:
Expand Down
10 changes: 6 additions & 4 deletions cmake/llvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ function(configure_llvm_project TARGET_NAME)
set(BUILD_COMMAND cmake --build <BINARY_DIR> --config Release)
endif()

set(DEPS_DIR ${CMAKE_SOURCE_DIR}/deps)

include(ExternalProject)
ExternalProject_Add(llvm-project
PREFIX llvm
DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}/downloads
BINARY_DIR llvm # Build directly to install dir to avoid copy.
SOURCE_DIR llvm/src/llvm
PREFIX ${DEPS_DIR}/llvm
DOWNLOAD_DIR ${DEPS_DIR}/downloads
DOWNLOAD_NO_PROGRESS 1
BINARY_DIR ${DEPS_DIR}/llvm # Build directly to install dir to avoid copy.
URL http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz
URL_HASH SHA256=1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release
Expand Down

0 comments on commit 7aef50d

Please sign in to comment.