blob: 85e9db964167ae7ae95ffaf8bdee37208d459f45 [file] [log] [blame]
borenet11271fe2015-07-06 07:43:58 -07001#!/bin/bash
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
4# found in the LICENSE file.
5
6# Build Skia for use with LLVM's coverage tools.
7#
8# $ tools/llvm_coverage_build [any other flags to pass to make...]
9#
borenet5150a772015-07-17 07:31:07 -070010# This script assumes the use of Clang 3.6. Earlier versions do not support
11# the flags we use in the build, and 3.7+ hit asserts during compilation.
borenet11271fe2015-07-06 07:43:58 -070012#
13set -e
14
borenet5150a772015-07-17 07:31:07 -070015export CC="${CC:-$(which clang)}"
16export CXX="${CXX:-$(which clang++)}"
borenet11271fe2015-07-06 07:43:58 -070017
18if [[ -z "${CC}" ]] || [[ -z "${CXX}" ]]; then
19 echo "Couldn't find Clang on this machine!"
20 exit 1
21fi
22
23echo "CC=$CC"
24echo "CXX=$CXX"
25$CC --version
26
mtkleinf0599002015-07-13 06:18:39 -070027export GYP_DEFINES="skia_clang_build=1"
borenet11271fe2015-07-06 07:43:58 -070028export BUILDTYPE=Coverage
29make $@