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

Side by Side Diff: gin/BUILD.gn

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: . Created 3 years, 7 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//testing/test.gni") 5 import("//testing/test.gni")
6 import("//v8/gni/v8.gni") 6 import("//v8/gni/v8.gni")
7 7
8 # This is depended upon from the browser DLL on Windows, where V8 is not used, 8 # This is depended upon from the browser DLL on Windows, where V8 is not used,
9 # but features are enabled. This cannot depend on V8. 9 # but features are enabled. This cannot depend on V8.
10 component("gin_features") { 10 component("gin_features") {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ] 88 ]
89 89
90 if (v8_use_external_startup_data) { 90 if (v8_use_external_startup_data) {
91 data = [ 91 data = [
92 "$root_out_dir/natives_blob.bin", 92 "$root_out_dir/natives_blob.bin",
93 "$root_out_dir/snapshot_blob.bin", 93 "$root_out_dir/snapshot_blob.bin",
94 ] 94 ]
95 } 95 }
96 96
97 defines = [ "GIN_IMPLEMENTATION" ] 97 defines = [ "GIN_IMPLEMENTATION" ]
98
99 public_deps = [ 98 public_deps = [
100 "//base", 99 "//base",
101 "//v8", 100 "//v8",
102 ] 101 ]
102
103 deps = [ 103 deps = [
104 ":gin_features", 104 ":gin_features",
105 "//base/third_party/dynamic_annotations", 105 "//base/third_party/dynamic_annotations",
106 "//crypto", 106 "//crypto",
107 ] 107 ]
108 108
109 if (is_mac) { 109 if (is_mac) {
110 libs = [ "CoreFoundation.framework" ] 110 libs = [ "CoreFoundation.framework" ]
111 } 111 }
112 112
(...skipping 10 matching lines...) Expand all
123 "//base", 123 "//base",
124 "//base:i18n", 124 "//base:i18n",
125 "//build/config/sanitizers:deps", 125 "//build/config/sanitizers:deps",
126 "//build/win:default_exe_manifest", 126 "//build/win:default_exe_manifest",
127 "//v8", 127 "//v8",
128 ] 128 ]
129 129
130 configs += [ "//v8:external_startup_data" ] 130 configs += [ "//v8:external_startup_data" ]
131 } 131 }
132 132
133 action("run_gin_blink_snapshot") {
134 script = "run.py"
135 exec = "$root_out_dir/gin_blink_snapshot"
Yuki 2017/04/28 13:48:27 Not so bad, but a little confusing name, I think.
peria 2017/06/01 08:33:31 Done.
136 output_file = "$root_out_dir/context_blob.bin"
137 output_path = rebase_path(output_file, root_build_dir)
138
139 args = [
140 rebase_path(exec, root_build_dir),
141 "--output_file=$output_path",
142 ]
143
144 outputs = [
145 output_file,
146 ]
147
148 deps = [
149 ":gin_blink_snapshot($host_toolchain)",
150 ]
151 }
152
153 config("noicf") {
154 if (is_win) {
155 ldflags = [ "/OPT:NOICF" ]
156 } else if (is_posix && !is_mac) {
157 ldflags = [ "-Wl,--icf=none" ]
158 }
159 }
160
161 executable("gin_blink_snapshot") {
162 sources = [
163 "shell/gin_prepare_main.cc",
164 ]
165
166 deps = [
167 ":gin",
168 "//mojo/edk/system:system",
169 "//third_party/WebKit/public:blink",
170 ]
171
172 configs += [
173 "//v8:external_startup_data",
174 ":noicf",
Yuki 2017/04/28 13:48:27 Better to comment why we need :noicf.
peria 2017/06/20 10:20:13 Done.
175 ]
176 }
177
133 source_set("gin_test") { 178 source_set("gin_test") {
134 testonly = true 179 testonly = true
135 sources = [ 180 sources = [
136 "test/file.cc", 181 "test/file.cc",
137 "test/file.h", 182 "test/file.h",
138 "test/file_runner.cc", 183 "test/file_runner.cc",
139 "test/file_runner.h", 184 "test/file_runner.h",
140 "test/gc.cc", 185 "test/gc.cc",
141 "test/gc.h", 186 "test/gc.h",
142 "test/gtest.cc", 187 "test/gtest.cc",
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 "shell/hello_world.js", 236 "shell/hello_world.js",
192 "test/file_unittests.js", 237 "test/file_unittests.js",
193 "test/gtest_unittests.js", 238 "test/gtest_unittests.js",
194 "../OWNERS", 239 "../OWNERS",
195 ] 240 ]
196 241
197 data_deps = [ 242 data_deps = [
198 ":gin_shell", 243 ":gin_shell",
199 ] 244 ]
200 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698