[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / third_party / libgav1 / BUILD.gn
1 # Copyright 2019 The Chromium Authors
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/config/arm.gni")
6 import("//testing/libfuzzer/fuzzer_test.gni")
7 import("//third_party/libgav1/options.gni")
8
9 config("public_libgav1_config") {
10   include_dirs = [
11     "src",
12     "src/src",
13   ]
14
15   defines = [
16     "LIBGAV1_MAX_BITDEPTH=10",
17     "LIBGAV1_THREADPOOL_USE_STD_MUTEX",  # to avoid abseil dependency.
18     "LIBGAV1_ENABLE_LOGGING=0",  # to avoid debug log of libgav1 in chromium
19                                  # debug build.
20
21     # Don't let libgav1 export any symbols. Otherwise the verify_order step on
22     # macOS can fail since these exports end up in the final Chromium binary.
23     "LIBGAV1_PUBLIC=",
24   ]
25 }
26
27 config("private_libgav1_config") {
28   configs = []
29
30   # dsp intrinsics will generate much better code when optimized for speed
31   # rather than size.
32   if (!is_debug) {
33     configs += [ "//build/config/compiler:optimize_max" ]
34   }
35   if (current_cpu == "arm64" ||
36       (current_cpu == "arm" && arm_version >= 7 && arm_use_neon)) {
37     # The default thumb mode will impact performance of dsp intrinsics.
38     configs += [ "//build/config/compiler:compiler_arm" ]
39   }
40 }
41
42 if (use_libgav1_parser) {
43   static_library("libgav1_parser") {
44     configs -= [ "//build/config/compiler:chromium_code" ]
45     configs += [ "//build/config/compiler:no_chromium_code" ]
46     configs += [ ":private_libgav1_config" ]
47
48     public_configs = [ ":public_libgav1_config" ]
49
50     sources = [
51       "//third_party/libgav1/src/src/buffer_pool.cc",
52       "//third_party/libgav1/src/src/buffer_pool.h",
53       "//third_party/libgav1/src/src/frame_buffer.cc",
54       "//third_party/libgav1/src/src/internal_frame_buffer_list.cc",
55       "//third_party/libgav1/src/src/internal_frame_buffer_list.h",
56       "//third_party/libgav1/src/src/obu_parser.cc",
57       "//third_party/libgav1/src/src/obu_parser.h",
58       "//third_party/libgav1/src/src/quantizer.cc",
59       "//third_party/libgav1/src/src/quantizer.h",
60       "//third_party/libgav1/src/src/status_code.cc",
61       "//third_party/libgav1/src/src/symbol_decoder_context.cc",
62       "//third_party/libgav1/src/src/symbol_decoder_context.h",
63       "//third_party/libgav1/src/src/utils/bit_reader.cc",
64       "//third_party/libgav1/src/src/utils/bit_reader.h",
65       "//third_party/libgav1/src/src/utils/constants.cc",
66       "//third_party/libgav1/src/src/utils/constants.h",
67       "//third_party/libgav1/src/src/utils/logging.cc",
68       "//third_party/libgav1/src/src/utils/logging.h",
69       "//third_party/libgav1/src/src/utils/raw_bit_reader.cc",
70       "//third_party/libgav1/src/src/utils/raw_bit_reader.h",
71       "//third_party/libgav1/src/src/utils/segmentation.cc",
72       "//third_party/libgav1/src/src/utils/segmentation.h",
73       "//third_party/libgav1/src/src/utils/segmentation_map.cc",
74       "//third_party/libgav1/src/src/utils/segmentation_map.h",
75       "//third_party/libgav1/src/src/warp_prediction.cc",
76       "//third_party/libgav1/src/src/warp_prediction.h",
77       "//third_party/libgav1/src/src/yuv_buffer.cc",
78       "//third_party/libgav1/src/src/yuv_buffer.h",
79     ]
80   }
81
82   fuzzer_test("libgav1_obu_parser_fuzzer") {
83     sources = [
84       "//third_party/libgav1/src/examples/file_reader.cc",
85       "//third_party/libgav1/src/examples/file_reader.h",
86       "//third_party/libgav1/src/examples/file_reader_constants.cc",
87       "//third_party/libgav1/src/examples/file_reader_constants.h",
88       "//third_party/libgav1/src/examples/file_reader_factory.cc",
89       "//third_party/libgav1/src/examples/file_reader_factory.h",
90       "//third_party/libgav1/src/examples/file_reader_interface.h",
91       "//third_party/libgav1/src/examples/ivf_parser.cc",
92       "//third_party/libgav1/src/examples/ivf_parser.h",
93       "//third_party/libgav1/src/examples/logging.h",
94       "//third_party/libgav1/src/tests/fuzzer/obu_parser_fuzzer.cc",
95     ]
96     deps = [ ":libgav1_parser" ]
97     defines = [ "LIBGAV1_EXAMPLES_ENABLE_LOGGING=0" ]
98     additional_configs = [ ":private_libgav1_config" ]
99   }
100 }