Update V8 to version 4.7.56.
[chromium-blink-merge.git] / courgette / BUILD.gn
blob1ebd2ee7a8aa20964e792421edf8ed920dccb5a9
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     "memory_allocator.cc",
38     "memory_allocator.h",
39     "patch_generator_x86_32.h",
40     "patcher_x86_32.h",
41     "region.h",
42     "simple_delta.cc",
43     "simple_delta.h",
44     "streams.cc",
45     "streams.h",
46     "third_party/bsdiff.h",
47     "third_party/bsdiff_apply.cc",
48     "third_party/bsdiff_create.cc",
49     "third_party/paged_array.h",
50     "third_party/qsufsort.h",
51     "types_elf.h",
52     "types_win_pe.h",
53   ]
55   deps = [
56     "//base",
57     "//third_party/lzma_sdk",
58   ]
61 executable("courgette") {
62   if (is_win && current_cpu == "x64") {
63     # The build infrastructure needs courgette to be named courgette64.
64     output_name = "courgette64"
65   }
67   sources = [
68     "courgette_tool.cc",
69   ]
71   if (is_win) {
72     ldflags = [ "/LARGEADDRESSAWARE" ]
73   }
75   deps = [
76     ":courgette_lib",
77     "//base",
78     "//build/config/sanitizers:deps",
79   ]
82 executable("courgette_minimal_tool") {
83   sources = [
84     "courgette_minimal_tool.cc",
85   ]
87   deps = [
88     ":courgette_lib",
89     "//base",
90     "//build/config/sanitizers:deps",
91   ]
94 test("courgette_unittests") {
95   sources = [
96     "adjustment_method_unittest.cc",
97     "base_test_unittest.cc",
98     "base_test_unittest.h",
99     "bsdiff_memory_unittest.cc",
100     "difference_estimator_unittest.cc",
101     "disassembler_elf_32_x86_unittest.cc",
102     "disassembler_win32_x64_unittest.cc",
103     "disassembler_win32_x86_unittest.cc",
104     "encode_decode_unittest.cc",
105     "encoded_program_unittest.cc",
106     "ensemble_unittest.cc",
107     "memory_allocator_unittest.cc",
108     "streams_unittest.cc",
109     "third_party/paged_array_unittest.cc",
110     "third_party/qsufsort_unittest.cc",
111     "typedrva_unittest.cc",
112     "versioning_unittest.cc",
113   ]
115   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
116   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
118   deps = [
119     ":courgette_lib",
120     "//base",
121     "//base:i18n",
122     "//base/allocator",
123     "//base/test:run_all_unittests",
124     "//base/test:test_support",
125     "//testing/gtest",
126   ]
129 test("courgette_fuzz") {
130   sources = [
131     "base_test_unittest.cc",
132     "base_test_unittest.h",
133     "encoded_program_fuzz_unittest.cc",
134   ]
135   deps = [
136     ":courgette_lib",
137     "//base",
138     "//base:i18n",
139     "//base/test:test_support",
140     "//testing/gtest",
141   ]