1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/buildflag_header.gni")
6 import("//sandbox/features.gni")
7 import("//testing/libfuzzer/fuzzer_test.gni")
9 # Several targets want to include this header file. We separate it out
10 # here so multiple targets can depend on it.
11 source_set("sandbox_export") {
17 source_set("common") {
23 # Meta-target that forwards to the proper platform one.
27 "//sandbox/win:sandbox",
31 "//sandbox/mac:seatbelt",
32 "//sandbox/mac:seatbelt_extension",
33 "//sandbox/mac:system_services",
34 "//sandbox/mac/mojom",
36 } else if (is_linux || is_android || is_tizen) {
38 "//sandbox/linux:sandbox",
43 buildflag_header("sandbox_buildflags") {
44 header = "sandbox_buildflags.h"
45 flags = [ "USE_SECCOMP_BPF=$use_seccomp_bpf" ]
48 # This target must be here and not in win/ otherwise it would require a full
49 # parse of win/BUILD.gn which fails on non-Windows platforms.
51 # Although the code is Windows-based, the fuzzer is designed to work on Linux,
52 # so do not disable this fuzzer on non-Windows platforms.
53 fuzzer_test("sandbox_ipc_fuzzer") {
54 set_sources_assignment_filter([])
56 "win/fuzzer/fuzzer_types.h",
57 "win/fuzzer/sandbox_ipc_fuzzer.cc",
58 "win/src/crosscall_server.cc",
59 "win/src/ipc_args.cc",
62 defines = [ "SANDBOX_FUZZ_TARGET" ]
68 libfuzzer_options = [ "max_len=1024" ]