Upload upstream chromium 76.0.3809.146
[platform/framework/web/chromium-efl.git] / sandbox / BUILD.gn
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.
4
5 import("//build/buildflag_header.gni")
6 import("//sandbox/features.gni")
7 import("//testing/libfuzzer/fuzzer_test.gni")
8
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 = [
13     "sandbox_export.h",
14   ]
15 }
16
17 source_set("common") {
18   sources = [
19     "constants.h",
20   ]
21 }
22
23 # Meta-target that forwards to the proper platform one.
24 group("sandbox") {
25   if (is_win) {
26     public_deps = [
27       "//sandbox/win:sandbox",
28     ]
29   } else if (is_mac) {
30     public_deps = [
31       "//sandbox/mac:seatbelt",
32       "//sandbox/mac:seatbelt_extension",
33       "//sandbox/mac:system_services",
34       "//sandbox/mac/mojom",
35     ]
36   } else if (is_linux || is_android || is_tizen) {
37     public_deps = [
38       "//sandbox/linux:sandbox",
39     ]
40   }
41 }
42
43 buildflag_header("sandbox_buildflags") {
44   header = "sandbox_buildflags.h"
45   flags = [ "USE_SECCOMP_BPF=$use_seccomp_bpf" ]
46 }
47
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.
50 #
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([])
55   sources = [
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",
60   ]
61   if (!is_win) {
62     defines = [ "SANDBOX_FUZZ_TARGET" ]
63   }
64   deps = [
65     "//base",
66   ]
67   dict = "ipc.dict"
68   libfuzzer_options = [ "max_len=1024" ]
69 }