[M67 Dev][EFL] Integrate GN configuration
[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 # Meta-target that forwards to the proper platform one.
18 group("sandbox") {
19   if (is_win) {
20     public_deps = [
21       "//sandbox/win:sandbox",
22     ]
23   } else if (is_mac) {
24     public_deps = [
25       "//sandbox/mac:seatbelt",
26       "//sandbox/mac:seatbelt_extension",
27       "//sandbox/mac/mojom",
28     ]
29   } else if (is_linux || is_android || is_tizen) {
30     public_deps = [
31       "//sandbox/linux:sandbox",
32     ]
33   }
34 }
35
36 buildflag_header("sandbox_buildflags") {
37   header = "sandbox_buildflags.h"
38   flags = [ "USE_SECCOMP_BPF=$use_seccomp_bpf" ]
39 }
40
41 # This target must be here and not in win/ otherwise it would require a full
42 # parse of win/BUILD.gn which fails on non-Windows platforms.
43 #
44 # Although the code is Windows-based, the fuzzer is designed to work on Linux,
45 # so do not disable this fuzzer on non-Windows platforms.
46 fuzzer_test("sandbox_ipc_fuzzer") {
47   set_sources_assignment_filter([])
48   sources = [
49     "ipc.dict",
50     "win/fuzzer/fuzzer_defines.h",
51     "win/fuzzer/sandbox_ipc_fuzzer.cc",
52     "win/src/crosscall_server.cc",
53     "win/src/ipc_args.cc",
54   ]
55   defines = [ "SANDBOX_FUZZ_TARGET" ]
56   deps = [
57     "//base",
58   ]
59   dict = "ipc.dict"
60   libfuzzer_options = [ "max_len=1024" ]
61 }