| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Build Skia for use with LLVM's coverage tools. | 6 # Build Skia for use with LLVM's coverage tools. |
| 7 # | 7 # |
| 8 # $ tools/llvm_coverage_build [any other flags to pass to make...] | 8 # $ tools/llvm_coverage_build [any other flags to pass to make...] |
| 9 # | 9 # |
| 10 # This script assumes the use of Clang >=3.6. | 10 # This script assumes the use of Clang >=3.6. |
| 11 # | 11 # |
| 12 set -e | 12 set -e |
| 13 | 13 |
| 14 export CC="$(which clang)" | 14 export CC="$(which clang)" |
| 15 export CXX="$(which clang++)" | 15 export CXX="$(which clang++)" |
| 16 | 16 |
| 17 if [[ -z "${CC}" ]] || [[ -z "${CXX}" ]]; then | 17 if [[ -z "${CC}" ]] || [[ -z "${CXX}" ]]; then |
| 18 echo "Couldn't find Clang on this machine!" | 18 echo "Couldn't find Clang on this machine!" |
| 19 exit 1 | 19 exit 1 |
| 20 fi | 20 fi |
| 21 | 21 |
| 22 echo "CC=$CC" | 22 echo "CC=$CC" |
| 23 echo "CXX=$CXX" | 23 echo "CXX=$CXX" |
| 24 $CC --version | 24 $CC --version |
| 25 | 25 |
| 26 export GYP_DEFINES="skia_warnings_as_errors=0 skia_clang_build=1" | 26 export GYP_DEFINES="skia_clang_build=1" |
| 27 export BUILDTYPE=Coverage | 27 export BUILDTYPE=Coverage |
| 28 make $@ | 28 make $@ |
| OLD | NEW |