diff options
Diffstat (limited to 'fuzz/build.sh')
-rwxr-xr-x | fuzz/build.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fuzz/build.sh b/fuzz/build.sh new file mode 100755 index 0000000..ae6ba1a --- /dev/null +++ b/fuzz/build.sh @@ -0,0 +1,20 @@ +#!/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/ director. +# Expects /src/tpm2 to contain tpm2 checkout. + +mkdir /work/tpm2 +cd /src/tpm2 +make V=1 obj=/work/tpm2 /work/tpm2/libtpm2.a + +find /usr/lib -name "*.a" +grep -r BN_CTX_get /usr/lib/ + +$CXX $CXXFLAGS $FUZZER_LDFLAGS -std=c++11 \ + /src/tpm2/fuzz/execute-command.cc -o /out/tpm2_execute_command_fuzzer \ + /work/libfuzzer/*.o /work/tpm2/libtpm2.a \ + /usr/lib/x86_64-linux-gnu/libcrypto.a /usr/lib/x86_64-linux-gnu/libssl.a \ + -I /src/tpm2 |