aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/cras/build.sh
blob: 23c27f973a28ac1c076dabf50772c8122cbcac6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash -eux
# Copyright 2017 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/cras to contain a cras checkout.

cd ${SRC}/adhd/cras
./git_prepare.sh
./configure --disable-dbus --disable-webrtc-apm
make -j$(nproc)

$CXX $CXXFLAGS $FUZZER_LDFLAGS \
  ${SRC}/adhd/cras/src/fuzz/rclient_message.cc -o ${OUT}/rclient_message \
  -I ${SRC}/adhd/cras/src/server \
  -I ${SRC}/adhd/cras/src/common \
  ${SRC}/adhd/cras/src/.libs/libcrasserver.a \
  -lpthread -lrt -ludev -ldl -lm \
  -lFuzzingEngine \
  -Wl,-Bstatic -liniparser -lasound -lspeexdsp -Wl,-Bdynamic
zip -j ${OUT}/rclient_message_corpus.zip ${SRC}/adhd/cras/src/fuzz/corpus/*