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") {
12 sources = [ "sandbox_export.h" ]
15 source_set("common") {
16 sources = [ "constants.h" ]
19 # Meta-target that forwards to the proper platform one.
22 public_deps = [ "//sandbox/win:sandbox" ]
25 "//sandbox/mac:seatbelt",
26 "//sandbox/mac:seatbelt_extension",
27 "//sandbox/mac:system_services",
28 "//sandbox/mac/mojom",
30 } else if (is_linux || is_android || is_tizen) {
31 public_deps = [ "//sandbox/linux:sandbox" ]
35 buildflag_header("sandbox_buildflags") {
36 header = "sandbox_buildflags.h"
38 "USE_SECCOMP_BPF=$use_seccomp_bpf",
39 "DISABLE_SECCOMP_SSBD=$disable_seccomp_ssbd",
43 # This target must be here and not in win/ otherwise it would require a full
44 # parse of win/BUILD.gn which fails on non-Windows platforms.
46 # Although the code is Windows-based, the fuzzer is designed to work on Linux,
47 # so do not disable this fuzzer on non-Windows platforms.
48 fuzzer_test("sandbox_ipc_fuzzer") {
49 set_sources_assignment_filter([])
51 "win/fuzzer/fuzzer_types.h",
52 "win/fuzzer/sandbox_ipc_fuzzer.cc",
53 "win/src/crosscall_server.cc",
54 "win/src/ipc_args.cc",
57 defines = [ "SANDBOX_FUZZ_TARGET" ]
61 libfuzzer_options = [ "max_len=1024" ]