Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome_elf/BUILD.gn

Issue 832583007: Add GN files for chrome_elf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable chrome_elf. Small targets re-ordering in chrome_elf's BUILD.gn. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 import("//chrome/version.gni")
6
7 process_version("chrome_elf_resources") {
8 source = "//chrome/app/chrome_version.rc.version"
9 output = "$target_gen_dir/chrome_elf_version.rc"
10 extra_args = [
11 "-f",
12 rebase_path("chrome_elf.ver"),
13 ]
14 }
15
16 shared_library("chrome_elf") {
17 sources = [
18 "chrome_elf_main.cc",
19 "chrome_elf_main.h",
20 "$target_gen_dir/chrome_elf_version.rc",
21 ]
22 deps = [
23 ":blacklist",
24 ":chrome_elf_breakpad",
25 ":chrome_elf_lib",
26 ":chrome_elf_resources",
27 ]
28 configs += [ "//build/config/win:windowed" ]
29 ldflags = [
30 "/NODEFAULTLIB:user32.lib",
31 "/DEF:" + rebase_path("chrome_elf.def"),
32 ]
33 if (cpu_arch == "x86") {
34 # Don"t set an x64 base address (to avoid breaking HE-ASLR).
35 ldflags += [ "/BASE:0x01c20000" ]
36 }
37 }
38
39 source_set("chrome_elf_lib") {
40 sources = [
41 "create_file/chrome_create_file.cc",
42 "create_file/chrome_create_file.h",
43 "ntdll_cache.cc",
44 "ntdll_cache.h",
45 ]
46 deps = [
47 ":chrome_elf_common",
48 "//base:base_static",
49 "//sandbox",
50 ]
51 }
52
53 source_set("chrome_elf_constants") {
54 sources = [
55 "chrome_elf_constants.cc",
56 "chrome_elf_constants.h",
57 ]
58 }
59
60 source_set("chrome_elf_common") {
61 deps = [
62 ":chrome_elf_constants",
63 ]
64 sources = [
65 "chrome_elf_types.h",
66 "chrome_elf_util.cc",
67 "chrome_elf_util.h",
68 "thunk_getter.cc",
69 "thunk_getter.h",
70 ]
71 }
72
73 source_set("chrome_elf_breakpad") {
74 include_dirs = [ "$target_gen_dir" ]
75 sources = [
76 "breakpad.cc",
77 "breakpad.h",
78 ]
79 deps = [
80 ":chrome_elf_common",
81 "//breakpad:breakpad_handler",
82 "//chrome:version_header",
83 ]
84 }
85
86 if (is_component_build) {
87 shared_library("chrome_redirects") {
88 sources = [
89 "chrome_redirects_main.cc",
90 ]
91 deps = [
92 ":chrome_elf_lib",
93 ]
94 configs += [ "//build/config/win:windowed" ]
95 ldflags = [ "/DEF:" + rebase_path("chrome_redirects.def") ]
96
97 if (cpu_arch == "x86") {
98 # Don't set an x64 base address (to avoid breaking HE-ASLR).
99 ldflags += [ "/BASE:0x01c20000" ]
100 }
101 }
102 }
103
104 source_set("dll_hash") {
105 deps = [
106 "//base",
107 ]
108 sources = [
109 "dll_hash/dll_hash.cc",
110 "dll_hash/dll_hash.h",
111 ]
112 }
113
114 executable("dll_hash_main") {
115 deps = [
116 ":dll_hash",
117 ]
118 sources = [
119 "dll_hash/dll_hash_main.cc",
120 ]
121 }
122
123 static_library("blacklist") {
124 sources = [
125 "blacklist/blacklist.cc",
126 "blacklist/blacklist.h",
127 "blacklist/blacklist_interceptions.cc",
128 "blacklist/blacklist_interceptions.h",
129 ]
130 deps = [
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.
134 "//base:base_static",
135 ":chrome_elf_breakpad",
136 ":chrome_elf_constants",
137 "//sandbox:sandbox",
138 ]
139 }
140
141 test("chrome_elf_unittests_exe") {
142 output_name = "chrome_elf_unittests"
143 sources = [
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",
149 ]
150 include_dirs = [ "$target_gen_dir" ]
151 deps = [
152 ":chrome_elf_lib",
153 "//base",
154 "//base/test:run_all_unittests",
155 "//base/test:test_support",
156 "//sandbox",
157 "//testing/gtest",
158 ":blacklist",
159 ":blacklist_test_main_dll",
160 ]
161 data_deps = [
162 ":blacklist_test_dll_1",
163 ":blacklist_test_dll_2",
164 ":blacklist_test_dll_3",
165 ]
166 }
167
168 group("chrome_elf_unittests") {
169 testonly = true
170
171 # A dummy target to ensure that chrome_elf.dll and chrome.exe gets built
172 # when building chrome_elf_unittests.exe without introducing an
173 # explicit runtime dependency.
174 deps = [
175 "//chrome",
176 ":chrome_elf",
177 ":chrome_elf_unittests_exe",
178 ]
179 }
180
181 shared_library("blacklist_test_main_dll") {
182 sources = [
183 "blacklist/test/blacklist_test_main_dll.cc",
184 ]
185 deps = [
186 "//base",
187 ":blacklist",
188 ]
189 ldflags =
190 [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_main_dll.def") ]
191 }
192
193 shared_library("blacklist_test_dll_1") {
Slava Chigrin 2015/01/18 21:27:06 Not sure, whether this is correct equivalent for G
robertshield 2015/01/19 01:24:17 Ack, there was a difference between shared_library
Slava Chigrin 2015/01/19 12:41:22 Ah, understand, hope, placing blacklist_test_dll_1
194 sources = [
195 "blacklist/test/blacklist_test_dll_1.cc",
196 ]
197 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_1.def") ]
198 }
199
200 shared_library("blacklist_test_dll_2") {
201 sources = [
202 "blacklist/test/blacklist_test_dll_2.cc",
203 ]
204 ldflags = [ "/DEF:" + rebase_path("blacklist/test/blacklist_test_dll_2.def") ]
205 }
206
207 shared_library("blacklist_test_dll_3") {
208 sources = [
209 "blacklist/test/blacklist_test_dll_3.cc",
210 ]
211 }
OLDNEW
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698