• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eu
2# Copyright 2021 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16################################################################################
17
18echo "Precompiling AFLplusplus"
19
20pushd $SRC/aflplusplus > /dev/null
21make clean
22# Unset CFLAGS and CXXFLAGS while building AFL since we don't want to slow it
23# down with sanitizers.
24SAVE_CXXFLAGS=$CXXFLAGS
25SAVE_CFLAGS=$CFLAGS
26unset CXXFLAGS
27unset CFLAGS
28export AFL_IGNORE_UNKNOWN_ENVS=1
29make clean
30AFL_NO_X86=1 PYTHON_INCLUDE=/ make
31make -C utils/aflpp_driver
32
33popd > /dev/null
34
35echo "Done."
36