Add a Notification Settings Button to all web notifications behind the web platform...
[chromium-blink-merge.git] / courgette / BUILD.gn
blobbc9a9f63aae7fa6951f0c1e9bd44c7f3ab7b486d
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("//testing/test.gni")
7 static_library("courgette_lib") {
8   sources = [
9     "adjustment_method.cc",
10     "adjustment_method.h",
11     "adjustment_method_2.cc",
12     "assembly_program.cc",
13     "assembly_program.h",
14     "courgette.h",
15     "crc.cc",
16     "crc.h",
17     "difference_estimator.cc",
18     "difference_estimator.h",
19     "disassembler.cc",
20     "disassembler.h",
21     "disassembler_elf_32.cc",
22     "disassembler_elf_32.h",
23     "disassembler_elf_32_arm.cc",
24     "disassembler_elf_32_arm.h",
25     "disassembler_elf_32_x86.cc",
26     "disassembler_elf_32_x86.h",
27     "disassembler_win32_x64.cc",
28     "disassembler_win32_x64.h",
29     "disassembler_win32_x86.cc",
30     "disassembler_win32_x86.h",
31     "encoded_program.cc",
32     "encoded_program.h",
33     "ensemble.cc",
34     "ensemble.h",
35     "ensemble_apply.cc",
36     "ensemble_create.cc",
37     "image_utils.h",
38     "memory_allocator.cc",
39     "memory_allocator.h",
40     "patch_generator_x86_32.h",
41     "patcher_x86_32.h",
42     "region.h",
43     "rel32_finder_win32_x86.cc",
44     "rel32_finder_win32_x86.h",
45     "simple_delta.cc",
46     "simple_delta.h",
47     "streams.cc",
48     "streams.h",
49     "third_party/bsdiff.h",
50     "third_party/bsdiff_apply.cc",
51     "third_party/bsdiff_create.cc",
52     "third_party/paged_array.h",
53     "third_party/qsufsort.h",
54     "types_elf.h",
55     "types_win_pe.h",
56   ]
58   deps = [
59     "//base",
60     "//third_party/lzma_sdk",
61   ]
64 executable("courgette") {
65   if (is_win && current_cpu == "x64") {
66     # The build infrastructure needs courgette to be named courgette64.
67     output_name = "courgette64"
68   }
70   sources = [
71     "courgette_tool.cc",
72   ]
74   if (is_win) {
75     ldflags = [ "/LARGEADDRESSAWARE" ]
76   }
78   deps = [
79     ":courgette_lib",
80     "//base",
81     "//build/config/sanitizers:deps",
82   ]
85 executable("courgette_minimal_tool") {
86   sources = [
87     "courgette_minimal_tool.cc",
88   ]
90   deps = [
91     ":courgette_lib",
92     "//base",
93     "//build/config/sanitizers:deps",
94   ]
97 test("courgette_unittests") {
98   sources = [
99     "adjustment_method_unittest.cc",
100     "base_test_unittest.cc",
101     "base_test_unittest.h",
102     "bsdiff_memory_unittest.cc",
103     "difference_estimator_unittest.cc",
104     "disassembler_elf_32_x86_unittest.cc",
105     "disassembler_win32_x64_unittest.cc",
106     "disassembler_win32_x86_unittest.cc",
107     "encode_decode_unittest.cc",
108     "encoded_program_unittest.cc",
109     "ensemble_unittest.cc",
110     "image_utils_unittest.cc",
111     "memory_allocator_unittest.cc",
112     "rel32_finder_win32_x86_unittest.cc",
113     "streams_unittest.cc",
114     "third_party/paged_array_unittest.cc",
115     "third_party/qsufsort_unittest.cc",
116     "typedrva_unittest.cc",
117     "versioning_unittest.cc",
118   ]
120   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
121   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
123   deps = [
124     ":courgette_lib",
125     "//base",
126     "//base:i18n",
127     "//base/allocator",
128     "//base/test:run_all_unittests",
129     "//base/test:test_support",
130     "//testing/gtest",
131   ]
134 test("courgette_fuzz") {
135   sources = [
136     "base_test_unittest.cc",
137     "base_test_unittest.h",
138     "encoded_program_fuzz_unittest.cc",
139   ]
140   deps = [
141     ":courgette_lib",
142     "//base",
143     "//base:i18n",
144     "//base/test:test_support",
145     "//testing/gtest",
146   ]