Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@ matrix:
include:
- os: linux
rust: stable
# - os: osx
# rust: stable
- os: osx
osx_image: xcode8
rust: stable

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./build_linux.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew config;
brew update;
brew install -v https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/llvm38.rb; fi

- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./build_osx.sh; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LIBCLANG_STATIC_PATH=~/clang/lib; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LLVM_CONFIG_PATH=/usr/local/bin/llvm-config-3.8; export LIBCLANG_STATIC_PATH=`/usr/local/bin/llvm-config-3.8 --libdir`; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LLVM_CONFIG_PATH=/clang/bin/llvm-config; fi
- cargo build --verbose --features "clang_3_8 static"
- RUST_TEST_THREADS=1 cargo test --verbose --features "clang_3_8 static"

Expand Down
22 changes: 22 additions & 0 deletions build_osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -x
set -o errexit
brew config;
brew update;
brew install --force curl ninja
pushd $HOME
if [ ! -d "llvm/tools" ]; then rm -rf llvm; git clone -b release_38 --depth=1 https://github.com/llvm-mirror/llvm.git; fi
pushd llvm
pushd tools
if [ ! -d "clang" ]; then git clone -b release_38 --depth=1 https://github.com/llvm-mirror/clang.git; fi
popd
mkdir -p _build
pushd _build
cmake .. -DLIBCLANG_BUILD_STATIC=On -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/clang -DLLVM_TARGETS_TO_BUILD=X86 -GNinja
ninja
sudo mkdir -p /clang
sudo ninja install
sudo cp lib/libclang.a /clang/lib
popd
popd
popd