1 # Copyright 2015 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("//chrome/version.gni")
6 import("//testing/test.gni")
8 process_version("chrome_elf_resources") {
12 output = "$target_gen_dir/chrome_elf_version.rc"
15 shared_library("chrome_elf") {
24 ":chrome_elf_resources",
26 configs += [ "//build/config/win:windowed" ]
27 configs -= [ "//build/config/win:console" ]
29 "/NODEFAULTLIB:user32.lib",
30 "/DEF:" + rebase_path("chrome_elf.def"),
32 if (current_cpu == "x86") {
33 # Don"t set an x64 base address (to avoid breaking HE-ASLR).
34 ldflags += [ "/BASE:0x01c20000" ]
40 "create_file/chrome_create_file.cc",
41 "create_file/chrome_create_file.h",
52 source_set("constants") {
54 "chrome_elf_constants.cc",
55 "chrome_elf_constants.h",
59 source_set("common") {
72 source_set("breakpad") {
73 include_dirs = [ "$target_gen_dir" ]
80 "//breakpad:breakpad_handler",
81 "//chrome:version_header",
85 if (is_component_build) {
86 shared_library("chrome_redirects") {
88 "chrome_redirects_main.cc",
93 configs += [ "//build/config/win:windowed" ]
94 ldflags = [ "/DEF:" + rebase_path("chrome_redirects.def") ]
96 if (current_cpu == "x86") {
97 # Don't set an x64 base address (to avoid breaking HE-ASLR).
98 ldflags += [ "/BASE:0x01c20000" ]
103 source_set("dll_hash") {
108 "dll_hash/dll_hash.cc",
109 "dll_hash/dll_hash.h",
113 executable("dll_hash_main") {
118 "dll_hash/dll_hash_main.cc",
122 static_library("blacklist") {
124 "blacklist/blacklist.cc",
125 "blacklist/blacklist.h",
126 "blacklist/blacklist_interceptions.cc",
127 "blacklist/blacklist_interceptions.h",
130 # Depend on base_static, but do NOT take a dependency on base.gyp:base
131 # as that would risk pulling in base's link-time dependencies which
132 # chrome_elf cannot do.
135 "//base:base_static",
140 test("chrome_elf_unittests") {
141 output_name = "chrome_elf_unittests"
143 "blacklist/test/blacklist_test.cc",
144 "chrome_elf_util_unittest.cc",
145 "create_file/chrome_create_file_unittest.cc",
146 "elf_imports_unittest.cc",
147 "ntdll_cache_unittest.cc",
149 include_dirs = [ "$target_gen_dir" ]
152 ":blacklist_test_main_dll",
155 "//base/test:run_all_unittests",
156 "//base/test:test_support",
161 ":blacklist_test_dll_1",
162 ":blacklist_test_dll_2",
163 ":blacklist_test_dll_3",
169 shared_library("blacklist_test_main_dll") {
171 "blacklist/test/blacklist_test_main_dll.cc",
178 [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_main_dll.def",
182 shared_library("blacklist_test_dll_1") {
184 "blacklist/test/blacklist_test_dll_1.cc",
186 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_1.def",
190 shared_library("blacklist_test_dll_2") {
192 "blacklist/test/blacklist_test_dll_2.cc",
194 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_2.def",
198 shared_library("blacklist_test_dll_3") {
200 "blacklist/test/blacklist_test_dll_3.cc",