blob: 8810d689d933ac260fb91d66920cb205c128e7e7 [file] [log] [blame]
# 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.
# Engine should be compiled without coverage (infinite loop in trace_cmp).
fuzzing_engine_remove_configs = [
# Add any sanitizer flags back. In MSAN builds, instrumenting libfuzzer with
# MSAN is necessary since all parts of the binary need to be instrumented for it
# to work. ASAN builds are more subtle: libfuzzer depends on features from the
# C++ STL. If it were not instrumented, templates would be insantiated without
# ASAN from libfuzzer and with ASAN in other TUs. The linker might merge
# instrumented template instantiations with non-instrumented ones (which could
# have a different ABI) in the final binary, which is problematic for TUs
# expecting one particular ABI ( The other sanitizers
# are added back for the same reason.
fuzzing_engine_add_configs =
[ "//build/config/sanitizers:default_sanitizer_flags_but_coverage" ]
source_set("libfuzzer") {
sources = [
configs -= fuzzing_engine_remove_configs
configs += fuzzing_engine_add_configs
if (use_afl) {
source_set("afl_driver") {
sources = [
configs -= fuzzing_engine_remove_configs
configs += fuzzing_engine_add_configs