Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / courgette / BUILD.gn
blob2deef9c253df3c58e008aa8bca52f2a78d9b679d
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     "courgette_config.cc",
16     "courgette_config.h",
17     "crc.cc",
18     "crc.h",
19     "difference_estimator.cc",
20     "difference_estimator.h",
21     "disassembler.cc",
22     "disassembler.h",
23     "disassembler_elf_32.cc",
24     "disassembler_elf_32.h",
25     "disassembler_elf_32_arm.cc",
26     "disassembler_elf_32_arm.h",
27     "disassembler_elf_32_x86.cc",
28     "disassembler_elf_32_x86.h",
29     "disassembler_win32_x64.cc",
30     "disassembler_win32_x64.h",
31     "disassembler_win32_x86.cc",
32     "disassembler_win32_x86.h",
33     "encoded_program.cc",
34     "encoded_program.h",
35     "ensemble.cc",
36     "ensemble.h",
37     "ensemble_apply.cc",
38     "ensemble_create.cc",
39     "memory_allocator.cc",
40     "memory_allocator.h",
41     "patch_generator_x86_32.h",
42     "patcher_x86_32.h",
43     "region.h",
44     "simple_delta.cc",
45     "simple_delta.h",
46     "streams.cc",
47     "streams.h",
48     "third_party/bsdiff.h",
49     "third_party/bsdiff_apply.cc",
50     "third_party/bsdiff_create.cc",
51     "third_party/paged_array.h",
52     "third_party/qsufsort.h",
53     "types_elf.h",
54     "types_win_pe.h",
55   ]
57   deps = [
58     "//base",
59     "//third_party/lzma_sdk",
60   ]
63 executable("courgette") {
64   if (is_win && current_cpu == "x64") {
65     # The build infrastructure needs courgette to be named courgette64.
66     output_name = "courgette64"
67   }
69   sources = [
70     "courgette_tool.cc",
71   ]
73   if (is_win) {
74     ldflags = [ "/LARGEADDRESSAWARE" ]
75   }
77   deps = [
78     ":courgette_lib",
79     "//base",
80     "//build/config/sanitizers:deps",
81   ]
84 executable("courgette_minimal_tool") {
85   sources = [
86     "courgette_minimal_tool.cc",
87   ]
89   deps = [
90     ":courgette_lib",
91     "//base",
92     "//build/config/sanitizers:deps",
93   ]
96 test("courgette_unittests") {
97   sources = [
98     "adjustment_method_unittest.cc",
99     "base_test_unittest.cc",
100     "base_test_unittest.h",
101     "bsdiff_memory_unittest.cc",
102     "difference_estimator_unittest.cc",
103     "disassembler_elf_32_x86_unittest.cc",
104     "disassembler_win32_x64_unittest.cc",
105     "disassembler_win32_x86_unittest.cc",
106     "encode_decode_unittest.cc",
107     "encoded_program_unittest.cc",
108     "ensemble_unittest.cc",
109     "memory_allocator_unittest.cc",
110     "streams_unittest.cc",
111     "third_party/paged_array_unittest.cc",
112     "third_party/qsufsort_unittest.cc",
113     "typedrva_unittest.cc",
114     "versioning_unittest.cc",
115   ]
117   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
118   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
120   deps = [
121     ":courgette_lib",
122     "//base",
123     "//base:i18n",
124     "//base/allocator",
125     "//base/test:run_all_unittests",
126     "//base/test:test_support",
127     "//testing/gtest",
128   ]
131 test("courgette_fuzz") {
132   sources = [
133     "base_test_unittest.cc",
134     "base_test_unittest.h",
135     "encoded_program_fuzz_unittest.cc",
136   ]
137   deps = [
138     ":courgette_lib",
139     "//base",
140     "//base:i18n",
141     "//base/test:test_support",
142     "//testing/gtest",
143   ]