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") {
9 "adjustment_method.cc",
10 "adjustment_method.h",
11 "adjustment_method_2.cc",
12 "assembly_program.cc",
17 "difference_estimator.cc",
18 "difference_estimator.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",
37 "memory_allocator.cc",
39 "patch_generator_x86_32.h",
46 "third_party/bsdiff.h",
47 "third_party/bsdiff_apply.cc",
48 "third_party/bsdiff_create.cc",
49 "third_party/paged_array.h",
56 "//third_party/lzma_sdk",
60 executable("courgette") {
61 if (is_win && current_cpu == "x64") {
62 # The build infrastructure needs courgette to be named courgette64.
63 output_name = "courgette64"
71 ldflags = [ "/LARGEADDRESSAWARE" ]
80 executable("courgette_minimal_tool") {
82 "courgette_minimal_tool.cc",
91 test("courgette_unittests") {
93 "adjustment_method_unittest.cc",
94 "base_test_unittest.cc",
95 "base_test_unittest.h",
96 "bsdiff_memory_unittest.cc",
97 "difference_estimator_unittest.cc",
98 "disassembler_elf_32_x86_unittest.cc",
99 "disassembler_win32_x64_unittest.cc",
100 "disassembler_win32_x86_unittest.cc",
101 "encode_decode_unittest.cc",
102 "encoded_program_unittest.cc",
103 "ensemble_unittest.cc",
104 "streams_unittest.cc",
105 "third_party/paged_array_unittest.cc",
106 "typedrva_unittest.cc",
107 "versioning_unittest.cc",
110 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
111 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
118 "//base/test:run_all_unittests",
119 "//base/test:test_support",
124 test("courgette_fuzz") {
126 "base_test_unittest.cc",
127 "base_test_unittest.h",
128 "encoded_program_fuzz_unittest.cc",
134 "//base/test:test_support",