aboutsummaryrefslogtreecommitdiff
path: root/fuzz/build.sh
blob: 9b93338798cc465a49109eca3547a07603d96964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash -eux
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Builds fuzzers from within a container into /out/ directory.
# Expects /src/tpm2 to contain tpm2 checkout.

mkdir $WORK/tpm2
cd $SRC/tpm2
make V=1 obj=$WORK/tpm2 $WORK/tpm2/libtpm2.a

$CXX $CXXFLAGS $FUZZER_LDFLAGS -std=c++11 \
  $SRC/tpm2/fuzz/execute-command.cc -o $OUT/tpm2_execute_command_fuzzer \
  -I $SRC/tpm2 \
  $WORK/tpm2/libtpm2.a \
  /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libssl.a \
  -lFuzzingEngine