OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Chrome elf targets (excepting tests) should only link in kernel32. | 5 # Chrome elf targets (excepting tests) should only link in kernel32. |
6 # Please don't add dependencies on any other system libraries. | 6 # Please don't add dependencies on any other system libraries. |
7 | 7 |
8 import("//build/config/win/manifest.gni") | 8 import("//build/config/win/manifest.gni") |
9 import("//chrome/version.gni") | 9 import("//chrome/version.gni") |
10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
(...skipping 15 matching lines...) Expand all Loading... |
26 sources = [ | 26 sources = [ |
27 as_invoker_manifest, | 27 as_invoker_manifest, |
28 ] | 28 ] |
29 type = "dll" | 29 type = "dll" |
30 } | 30 } |
31 | 31 |
32 # We should move chrome_result_codes.h to another target which does not bring | 32 # We should move chrome_result_codes.h to another target which does not bring |
33 # in the world. | 33 # in the world. |
34 shared_library("chrome_elf") { | 34 shared_library("chrome_elf") { |
35 sources = [ | 35 sources = [ |
36 "//chrome/app/chrome_crash_reporter_client_win.cc", | |
37 "//chrome/app/chrome_crash_reporter_client_win.h", | |
38 "//chrome/common/chrome_result_codes.h", | |
39 "chrome_elf.def", | 36 "chrome_elf.def", |
40 "chrome_elf_main.cc", | 37 "chrome_elf_main.cc", |
41 "chrome_elf_main.h", | 38 "chrome_elf_main.h", |
42 ] | 39 ] |
43 deps = [ | 40 deps = [ |
44 ":blacklist", | 41 ":blacklist", |
45 ":chrome_elf_manifest", | 42 ":chrome_elf_manifest", |
46 ":chrome_elf_resources", | 43 ":chrome_elf_resources", |
47 ":chrome_elf_security", | |
48 ":constants", | 44 ":constants", |
| 45 ":crash", |
49 ":hook_util", | 46 ":hook_util", |
50 "//base", | 47 ":security", |
51 "//build/config/sanitizers:deps", | 48 "//build/config/sanitizers:deps", |
52 "//chrome/install_static:install_static_util", | 49 "//chrome/install_static:install_static_util", |
53 "//chrome_elf/nt_registry:nt_registry", | 50 "//chrome_elf/nt_registry:nt_registry", |
54 "//components/crash/content/app", | |
55 "//components/crash/core/common", | |
56 "//content/public/common:result_codes", | |
57 "//third_party/crashpad/crashpad/client:client", | |
58 ] | 51 ] |
59 configs += [ "//build/config/win:windowed" ] | 52 configs += [ "//build/config/win:windowed" ] |
60 configs -= [ "//build/config/win:console" ] | 53 configs -= [ "//build/config/win:console" ] |
61 ldflags = [ | 54 ldflags = [ |
62 "/NODEFAULTLIB:user32.lib", | 55 "/NODEFAULTLIB:user32.lib", |
63 "/DELAYLOAD:dbghelp.dll", | 56 "/DELAYLOAD:dbghelp.dll", |
64 "/DELAYLOAD:ole32.dll", | 57 "/DELAYLOAD:ole32.dll", |
65 "/DELAYLOAD:psapi.dll", | 58 "/DELAYLOAD:psapi.dll", |
66 "/DELAYLOAD:rpcrt4.dll", | 59 "/DELAYLOAD:rpcrt4.dll", |
67 "/DELAYLOAD:shell32.dll", | 60 "/DELAYLOAD:shell32.dll", |
68 "/DELAYLOAD:user32.dll", | |
69 "/DELAYLOAD:winhttp.dll", | 61 "/DELAYLOAD:winhttp.dll", |
70 "/DELAYLOAD:winmm.dll", | 62 "/DELAYLOAD:winmm.dll", |
71 "/DELAYLOAD:ws2_32.dll", | 63 "/DELAYLOAD:ws2_32.dll", |
72 ] | 64 ] |
73 if (current_cpu == "x86") { | 65 if (current_cpu == "x86") { |
74 # Don"t set an x64 base address (to avoid breaking HE-ASLR). | 66 # Don"t set an x64 base address (to avoid breaking HE-ASLR). |
75 ldflags += [ "/BASE:0x01c20000" ] | 67 ldflags += [ "/BASE:0x01c20000" ] |
76 } | 68 } |
77 } | 69 } |
78 | 70 |
79 ##------------------------------------------------------------------------------ | 71 ##------------------------------------------------------------------------------ |
80 ## source sets | 72 ## source sets |
81 ##------------------------------------------------------------------------------ | 73 ##------------------------------------------------------------------------------ |
82 | 74 |
83 source_set("chrome_elf_security") { | 75 source_set("security") { |
84 sources = [ | 76 sources = [ |
85 "chrome_elf_security.cc", | 77 "chrome_elf_security.cc", |
86 "chrome_elf_security.h", | 78 "chrome_elf_security.h", |
87 ] | 79 ] |
88 deps = [ | 80 deps = [ |
89 ":constants", | 81 ":constants", |
90 "//chrome_elf/nt_registry:nt_registry", | 82 "//chrome_elf/nt_registry:nt_registry", |
91 ] | 83 ] |
92 } | 84 } |
93 | 85 |
(...skipping 28 matching lines...) Expand all Loading... |
122 "//build/win:default_exe_manifest", | 114 "//build/win:default_exe_manifest", |
123 ] | 115 ] |
124 } | 116 } |
125 | 117 |
126 static_library("blacklist") { | 118 static_library("blacklist") { |
127 sources = [ | 119 sources = [ |
128 "blacklist/blacklist.cc", | 120 "blacklist/blacklist.cc", |
129 "blacklist/blacklist.h", | 121 "blacklist/blacklist.h", |
130 "blacklist/blacklist_interceptions.cc", | 122 "blacklist/blacklist_interceptions.cc", |
131 "blacklist/blacklist_interceptions.h", | 123 "blacklist/blacklist_interceptions.h", |
132 "blacklist/crashpad_helper.cc", | |
133 "blacklist/crashpad_helper.h", | |
134 ] | 124 ] |
135 public_deps = [ | 125 public_deps = [ |
136 "//sandbox", | 126 "//sandbox", |
137 ] | 127 ] |
138 deps = [ | 128 deps = [ |
139 ":constants", | 129 ":constants", |
| 130 ":crash", |
140 ":hook_util", | 131 ":hook_util", |
| 132 "//base:base_static", # pe_image |
141 "//chrome/install_static:install_static_util", | 133 "//chrome/install_static:install_static_util", |
142 "//chrome_elf/nt_registry:nt_registry", | 134 "//chrome_elf/nt_registry:nt_registry", |
| 135 ] |
| 136 } |
143 | 137 |
144 # Still uses base/win/pe_image.h | 138 static_library("crash") { |
145 "//base", | 139 sources = [ |
146 "//third_party/crashpad/crashpad/client:client", | 140 "../chrome/app/chrome_crash_reporter_client_win.cc", |
| 141 "../chrome/app/chrome_crash_reporter_client_win.h", |
| 142 "../chrome/common/chrome_result_codes.h", |
| 143 "crash/crash_helper.cc", |
| 144 "crash/crash_helper.h", |
| 145 ] |
| 146 deps = [ |
| 147 ":hook_util", |
| 148 "//base:base", # This needs to go. |
| 149 "//base:base_static", # pe_image |
| 150 "//chrome/install_static:install_static_util", |
| 151 "//components/crash/content/app:app", |
| 152 "//components/crash/core/common", # crash_keys |
| 153 "//content/public/common:result_codes", |
| 154 "//third_party/crashpad/crashpad/client:client", # DumpWithoutCrash |
147 ] | 155 ] |
148 } | 156 } |
149 | 157 |
150 static_library("hook_util") { | 158 static_library("hook_util") { |
151 sources = [ | 159 sources = [ |
152 "hook_util/thunk_getter.cc", | 160 "../base/macros.h", |
153 "hook_util/thunk_getter.h", | 161 "hook_util/hook_util.cc", |
| 162 "hook_util/hook_util.h", |
154 ] | 163 ] |
155 deps = [ | 164 deps = [ |
| 165 "//base:base_static", # pe_image |
156 "//sandbox", | 166 "//sandbox", |
157 ] | 167 ] |
158 } | 168 } |
159 | 169 |
160 ##------------------------------------------------------------------------------ | 170 ##------------------------------------------------------------------------------ |
161 ## tests | 171 ## tests |
162 ##------------------------------------------------------------------------------ | 172 ##------------------------------------------------------------------------------ |
163 | 173 |
164 test("chrome_elf_unittests") { | 174 test("chrome_elf_unittests") { |
165 output_name = "chrome_elf_unittests" | 175 output_name = "chrome_elf_unittests" |
166 sources = [ | 176 sources = [ |
167 "blacklist/test/blacklist_test.cc", | 177 "blacklist/test/blacklist_test.cc", |
168 "chrome_elf_util_unittest.cc", | 178 "chrome_elf_util_unittest.cc", |
169 "elf_imports_unittest.cc", | 179 "elf_imports_unittest.cc", |
170 "run_all_unittests.cc", | 180 "run_all_unittests.cc", |
171 ] | 181 ] |
172 include_dirs = [ "$target_gen_dir" ] | 182 include_dirs = [ "$target_gen_dir" ] |
173 deps = [ | 183 deps = [ |
174 ":blacklist", | 184 ":blacklist", |
175 ":blacklist_test_main_dll", | 185 ":blacklist_test_main_dll", |
176 ":chrome_elf_security", | |
177 ":constants", | 186 ":constants", |
| 187 ":crash", |
178 ":hook_util", | 188 ":hook_util", |
| 189 ":security", |
179 "//base", | 190 "//base", |
180 "//base/test:test_support", | 191 "//base/test:test_support", |
181 "//chrome", | 192 "//chrome", |
182 "//chrome/common:version_header", | 193 "//chrome/common:version_header", |
183 "//chrome/install_static:install_static_util", | 194 "//chrome/install_static:install_static_util", |
184 "//chrome_elf/nt_registry:nt_registry", | 195 "//chrome_elf/nt_registry:nt_registry", |
185 "//sandbox", | 196 "//sandbox", |
186 "//testing/gtest", | 197 "//testing/gtest", |
187 ] | 198 ] |
188 | 199 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 # which does), Ninja would get confused and always rebuild this target because | 276 # which does), Ninja would get confused and always rebuild this target because |
266 # it sees a declared output file but that file doesn't exist on disk. | 277 # it sees a declared output file but that file doesn't exist on disk. |
267 loadable_module("blacklist_test_dll_3") { | 278 loadable_module("blacklist_test_dll_3") { |
268 sources = [ | 279 sources = [ |
269 "blacklist/test/blacklist_test_dll_3.cc", | 280 "blacklist/test/blacklist_test_dll_3.cc", |
270 ] | 281 ] |
271 deps = [ | 282 deps = [ |
272 "//build/config/sanitizers:deps", | 283 "//build/config/sanitizers:deps", |
273 ] | 284 ] |
274 } | 285 } |
OLD | NEW |