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") {
17 "$target_gen_dir/chrome_elf_version.rc",
25 ":chrome_elf_resources",
27 configs += [ "//build/config/win:windowed" ]
28 configs -= [ "//build/config/win:console" ]
30 "/NODEFAULTLIB:user32.lib",
31 "/DEF:" + rebase_path("chrome_elf.def"),
33 if (current_cpu == "x86") {
34 # Don"t set an x64 base address (to avoid breaking HE-ASLR).
35 ldflags += [ "/BASE:0x01c20000" ]
41 "create_file/chrome_create_file.cc",
42 "create_file/chrome_create_file.h",
53 source_set("constants") {
55 "chrome_elf_constants.cc",
56 "chrome_elf_constants.h",
60 source_set("common") {
73 source_set("breakpad") {
74 include_dirs = [ "$target_gen_dir" ]
81 "//breakpad:breakpad_handler",
82 "//chrome:version_header",
86 if (is_component_build) {
87 shared_library("chrome_redirects") {
89 "chrome_redirects_main.cc",
94 configs += [ "//build/config/win:windowed" ]
95 ldflags = [ "/DEF:" + rebase_path("chrome_redirects.def") ]
97 if (current_cpu == "x86") {
98 # Don't set an x64 base address (to avoid breaking HE-ASLR).
99 ldflags += [ "/BASE:0x01c20000" ]
104 source_set("dll_hash") {
109 "dll_hash/dll_hash.cc",
110 "dll_hash/dll_hash.h",
114 executable("dll_hash_main") {
119 "dll_hash/dll_hash_main.cc",
123 static_library("blacklist") {
125 "blacklist/blacklist.cc",
126 "blacklist/blacklist.h",
127 "blacklist/blacklist_interceptions.cc",
128 "blacklist/blacklist_interceptions.h",
131 # Depend on base_static, but do NOT take a dependency on base.gyp:base
132 # as that would risk pulling in base's link-time dependencies which
133 # chrome_elf cannot do.
136 "//base:base_static",
141 test("chrome_elf_unittests") {
142 output_name = "chrome_elf_unittests"
144 "blacklist/test/blacklist_test.cc",
145 "chrome_elf_util_unittest.cc",
146 "create_file/chrome_create_file_unittest.cc",
147 "elf_imports_unittest.cc",
148 "ntdll_cache_unittest.cc",
150 include_dirs = [ "$target_gen_dir" ]
153 ":blacklist_test_main_dll",
156 "//base/test:run_all_unittests",
157 "//base/test:test_support",
162 ":blacklist_test_dll_1",
163 ":blacklist_test_dll_2",
164 ":blacklist_test_dll_3",
170 shared_library("blacklist_test_main_dll") {
172 "blacklist/test/blacklist_test_main_dll.cc",
179 [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_main_dll.def",
183 shared_library("blacklist_test_dll_1") {
185 "blacklist/test/blacklist_test_dll_1.cc",
187 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_1.def",
191 shared_library("blacklist_test_dll_2") {
193 "blacklist/test/blacklist_test_dll_2.cc",
195 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_2.def",
199 shared_library("blacklist_test_dll_3") {
201 "blacklist/test/blacklist_test_dll_3.cc",