[M94 Dev][Tizen] Fix for compiler and linker errors
[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 = [ "sandbox_export.h" ]
13 }
14
15 source_set("common") {
16   sources = [ "constants.h" ]
17 }
18
19 # Meta-target that forwards to the proper platform one.
20 group("sandbox") {
21   if (is_win) {
22     public_deps = [ "//sandbox/win:sandbox" ]
23   } else if (is_mac) {
24     public_deps = [
25       "//sandbox/mac:seatbelt",
26       "//sandbox/mac:seatbelt_extension",
27       "//sandbox/mac:system_services",
28       "//sandbox/mac/mojom",
29     ]
30   } else if (is_linux || is_chromeos || is_android || is_tizen) {
31     public_deps = [ "//sandbox/linux:sandbox" ]
32   }
33 }
34
35 buildflag_header("sandbox_buildflags") {
36   header = "sandbox_buildflags.h"
37   flags = [
38     "USE_SECCOMP_BPF=$use_seccomp_bpf",
39     "DISABLE_SECCOMP_SSBD=$disable_seccomp_ssbd",
40   ]
41 }
42
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.
45 #
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   sources = [
50     "win/fuzzer/fuzzer_types.h",
51     "win/fuzzer/sandbox_ipc_fuzzer.cc",
52     "win/src/crosscall_server.cc",
53     "win/src/ipc_args.cc",
54   ]
55   if (!is_win) {
56     defines = [ "SANDBOX_FUZZ_TARGET" ]
57   }
58   deps = [
59     ":sandbox",
60     "//base",
61   ]
62   dict = "ipc.dict"
63   libfuzzer_options = [ "max_len=1024" ]
64 }