summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-06-02 16:05:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-06-02 16:05:43 -0700
commitb37bd96ea3345cf7015e9e925e0d33524cd1c3db (patch)
tree0873196494c18cbef0a3f95ca91f44609fe24ca3
parent803a9f108d750eff57e9f88e3fadd48308acefc8 (diff)
downloadbinaryen-b37bd96ea3345cf7015e9e925e0d33524cd1c3db.tar.gz
binaryen-b37bd96ea3345cf7015e9e925e0d33524cd1c3db.tar.bz2
binaryen-b37bd96ea3345cf7015e9e925e0d33524cd1c3db.zip
Use clang from the waterfall (#557)
This avoids relying on clang from llvm, which sometimes is down (see #553)
-rw-r--r--.travis.yml32
-rwxr-xr-xcheck.py10
2 files changed, 24 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml
index 61585c3f7..9ff85f23d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,35 +6,32 @@ python:
matrix:
include:
- - env: COMPILER_VERSION=3.6
+ - env: CC_COMPILER="./test/wasm-install/wasm-install/bin/clang" CXX_COMPILER="./test/wasm-install/wasm-install/bin/clang++"
compiler: clang
- addons: &clang36
+ addons: &gcc5
apt:
- sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
- packages: ['cmake', 'nodejs', 'clang-3.6']
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['cmake', 'nodejs', 'g++-5']
- - env: COMPILER_VERSION=3.6 COMPILER_FLAGS="-fsanitize=undefined -fno-sanitize-recover=all -fsanitize-blacklist=`pwd`/ubsan.blacklist"
+ - env: CC_COMPILER="./test/wasm-install/wasm-install/bin/clang" CXX_COMPILER="./test/wasm-install/wasm-install/bin/clang++" COMPILER_FLAGS="-fsanitize=undefined -fno-sanitize-recover=all -fsanitize-blacklist=`pwd`/ubsan.blacklist"
compiler: clang
- addons: *clang36
+ addons: *gcc5
- - env: COMPILER_VERSION=3.6 COMPILER_FLAGS="-fsanitize=address"
+ - env: CC_COMPILER="./test/wasm-install/wasm-install/bin/clang" CXX_COMPILER="./test/wasm-install/wasm-install/bin/clang++" COMPILER_FLAGS="-fsanitize=address"
compiler: clang
- addons: *clang36
+ addons: *gcc5
- - env: COMPILER_VERSION=3.6 COMPILER_FLAGS="-fsanitize=thread"
+ - env: CC_COMPILER="./test/wasm-install/wasm-install/bin/clang" CXX_COMPILER="./test/wasm-install/wasm-install/bin/clang++" COMPILER_FLAGS="-fsanitize=thread"
compiler: clang
- addons: *clang36
+ addons: *gcc5
- - env: COMPILER_VERSION=5
+ - env: CC_COMPILER="gcc-5" CXX_COMPILER="g++-5"
compiler: gcc
- addons: &gcc5
- apt:
- sources: ['ubuntu-toolchain-r-test']
- packages: ['cmake', 'nodejs', 'g++-5']
+ addons: *gcc5
before_install:
- - export CC="${CC}-${COMPILER_VERSION}"
- - export CXX="${CXX}-${COMPILER_VERSION}"
+ - export CC="${CC_COMPILER}"
+ - export CXX="${CXX_COMPILER}"
- export ASAN_OPTIONS="symbolize=1"
install:
@@ -45,6 +42,7 @@ before_script:
- flake8 ./scripts/*
script:
+ - ./check.py --only-prepare
- cmake . -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
- make -j2
- ./check.py
diff --git a/check.py b/check.py
index af5182187..7e8586150 100755
--- a/check.py
+++ b/check.py
@@ -22,6 +22,7 @@ import scripts.support
interpreter = None
requested = []
torture = True
+only_prepare = False
for arg in sys.argv[1:]:
if arg.startswith('--interpreter='):
@@ -32,6 +33,8 @@ for arg in sys.argv[1:]:
torture = True
elif arg == '--no-torture':
torture = False
+ elif arg == '--only-prepare':
+ only_prepare = True
else:
requested.append(arg)
@@ -78,15 +81,20 @@ def setup_waterfall():
# if we can use the waterfall llvm, do so
global has_vanilla_llvm
CLANG = os.path.join(BIN_DIR, 'clang')
+ print 'trying waterfall clang at', CLANG
try:
- subprocess.check_call([CLANG, '-v'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ subprocess.check_call([CLANG, '-v'])
has_vanilla_llvm = True
+ print '...success'
except Exception, e:
warn('could not run vanilla LLVM from waterfall: ' + str(e) + ', looked for clang at ' + CLANG)
fetch_waterfall()
setup_waterfall()
+if only_prepare:
+ print 'waterfall is fetched and setup, exiting since --only-prepare'
+ sys.exit(0)
# external tools