naiveproxy/chrome/installer/zucchini/BUILD.gn

186 lines
3.9 KiB
Plaintext
Raw Normal View History

2018-01-28 21:32:06 +03:00
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/process_version_rc_template.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
static_library("zucchini_lib") {
sources = [
"abs32_utils.cc",
"abs32_utils.h",
"address_translator.cc",
"address_translator.h",
"algorithm.h",
"binary_data_histogram.cc",
"binary_data_histogram.h",
"buffer_sink.cc",
"buffer_sink.h",
"buffer_source.cc",
"buffer_source.h",
"buffer_view.h",
"crc32.cc",
"crc32.h",
"disassembler.cc",
"disassembler.h",
"disassembler_no_op.cc",
"disassembler_no_op.h",
"disassembler_win32.cc",
"disassembler_win32.h",
"element_detection.cc",
"element_detection.h",
"encoded_view.cc",
"encoded_view.h",
"equivalence_map.cc",
"equivalence_map.h",
"image_index.cc",
"image_index.h",
"image_utils.h",
"io_utils.cc",
"io_utils.h",
"label_manager.cc",
"label_manager.h",
"patch_reader.cc",
"patch_reader.h",
"patch_utils.h",
"patch_writer.cc",
"patch_writer.h",
"rel32_finder.cc",
"rel32_finder.h",
"rel32_utils.cc",
"rel32_utils.h",
"reloc_utils.cc",
"reloc_utils.h",
"suffix_array.h",
"targets_affinity.cc",
"targets_affinity.h",
"type_win_pe.h",
"typed_value.h",
"zucchini.h",
"zucchini_apply.cc",
"zucchini_apply.h",
"zucchini_gen.cc",
"zucchini_gen.h",
"zucchini_tools.cc",
"zucchini_tools.h",
]
deps = [
"//base",
]
}
static_library("zucchini_io") {
sources = [
"mapped_file.cc",
"mapped_file.h",
"zucchini_integration.cc",
"zucchini_integration.h",
]
deps = [
":zucchini_lib",
"//base",
]
}
executable("zucchini") {
sources = [
"main_utils.cc",
"main_utils.h",
"zucchini_commands.cc",
"zucchini_commands.h",
"zucchini_main.cc",
]
deps = [
":zucchini_io",
":zucchini_lib",
"//base",
"//build/config:exe_and_shlib_deps",
]
if (is_win) {
deps += [ ":zucchini_exe_version" ]
}
}
if (is_win) {
process_version_rc_template("zucchini_exe_version") {
template_file = "zucchini_exe_version.rc.version"
output = "$target_gen_dir/zucchini_exe_version.rc"
}
}
fuzzer_test("zucchini_patch_fuzzer") {
sources = [
"patch_fuzzer.cc",
]
deps = [
":zucchini_lib",
"//base",
]
seed_corpus = "testdata/patch_fuzzer"
}
test("zucchini_unittests") {
sources = [
"abs32_utils_unittest.cc",
"address_translator_unittest.cc",
"algorithm_unittest.cc",
"binary_data_histogram_unittest.cc",
"buffer_sink_unittest.cc",
"buffer_source_unittest.cc",
"buffer_view_unittest.cc",
"crc32_unittest.cc",
"element_detection_unittest.cc",
"encoded_view_unittest.cc",
"equivalence_map_unittest.cc",
"image_index_unittest.cc",
"image_utils_unittest.cc",
"io_utils_unittest.cc",
"label_manager_unittest.cc",
"mapped_file_unittest.cc",
"patch_read_write_unittest.cc",
"patch_utils_unittest.cc",
"rel32_finder_unittest.cc",
"rel32_utils_unittest.cc",
"reloc_utils_unittest.cc",
"suffix_array_unittest.cc",
"targets_affinity_unittest.cc",
"test_disassembler.cc",
"test_disassembler.h",
"test_reference_reader.cc",
"test_reference_reader.h",
"test_utils.cc",
"test_utils.h",
"typed_value_unittest.cc",
"zucchini_apply_unittest.cc",
"zucchini_gen_unittest.cc",
]
deps = [
":zucchini_io",
":zucchini_lib",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gtest",
]
}
test("zucchini_integration_test") {
sources = [
"integration_test.cc",
]
deps = [
":zucchini_lib",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gtest",
]
}