aboutsummaryrefslogtreecommitdiff
path: root/projects/linkerd2-proxy/build.sh
blob: 81044bcb0e99b51c281d7ebe01198d891df57baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash -eu
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

TARGET_PATH="./fuzz/target/x86_64-unknown-linux-gnu/release"
BASE="$SRC/linkerd2-proxy/linkerd"
BUILD_FUZZER="cargo +nightly fuzz build "

cd ${BASE}/app/inbound
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_inbound

cd ${BASE}/addr/
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_addr

cd ${BASE}/dns
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_dns

cd ${BASE}/proxy/http
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_http

cd ${BASE}/tls
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_tls

cd ${BASE}/transport-header
${BUILD_FUZZER}
cp ${TARGET_PATH}/fuzz_target_raw $OUT/fuzz_transport_raw
cp ${TARGET_PATH}/fuzz_target_structured $OUT/fuzz_transport_structured

echo "[libfuzzer]" > $OUT/fuzz_transport_raw.options
echo "detect_leaks=0" >> $OUT/fuzz_transport_raw.options