mirror of https://github.com/google/snappy.git
Fix Travis CI build.
* Fix bash conditionals: [ a == b ] should be [ a = b ]. * Upgrade to LLVM 9 on Travis. * Upgrade fuzzer build arguments for LLVM 9. PiperOrigin-RevId: 271898655
This commit is contained in:
parent
9dabbca006
commit
e9e11b84e6
19
.travis.yml
19
.travis.yml
|
@ -3,8 +3,8 @@
|
|||
# This file can be validated on: http://lint.travis-ci.org/
|
||||
|
||||
language: cpp
|
||||
dist: xenial
|
||||
osx_image: xcode10.2
|
||||
dist: bionic
|
||||
osx_image: xcode10.3
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
@ -31,10 +31,11 @@ matrix:
|
|||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-xenial-8
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||
packages:
|
||||
- clang-8
|
||||
- clang-9
|
||||
- cmake
|
||||
- gcc-9
|
||||
- g++-9
|
||||
|
@ -43,14 +44,14 @@ addons:
|
|||
packages:
|
||||
- cmake
|
||||
- gcc@9
|
||||
- llvm@8
|
||||
- llvm@9
|
||||
- ninja
|
||||
update: true
|
||||
|
||||
install:
|
||||
# The following Homebrew packages aren't linked by default, and need to be
|
||||
# prepended to the path explicitly.
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
export PATH="$(brew --prefix llvm)/bin:$PATH";
|
||||
fi
|
||||
# Fuzzing is only supported on Clang. Perform fuzzing on Debug builds.
|
||||
|
@ -66,8 +67,8 @@ install:
|
|||
# Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
|
||||
# below don't work on macOS. Fortunately, the path change above makes the
|
||||
# default values (clang and clang++) resolve to the correct compiler on macOS.
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
||||
if [ "$CXX" = "clang++" ]; then export CXX="clang++-8" CC="clang-8"; fi;
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
if [ "$CXX" = "clang++" ]; then export CXX="clang++-9" CC="clang-9"; fi;
|
||||
fi
|
||||
- echo ${CC}
|
||||
- echo ${CXX}
|
||||
|
|
|
@ -124,9 +124,9 @@ if (SNAPPY_FUZZING_BUILD)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize=address")
|
||||
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize-coverage=trace-pc-guard")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize-coverage=trace-pc-guard")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize-coverage=trace-pc-guard")
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize=fuzzer-no-link")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer-no-link")
|
||||
endif(NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize=fuzzer-no-link")
|
||||
endif (SNAPPY_FUZZING_BUILD)
|
||||
|
||||
configure_file(
|
||||
|
|
Loading…
Reference in New Issue