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

Side by Side Diff: gin/BUILD.gn

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Fix tests and introduce RuntimeEnabled flag 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 import("//v8/snapshot_toolchain.gni")
7 8
8 # This is depended upon from the browser DLL on Windows, where V8 is not used, 9 # 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. 10 # but features are enabled. This cannot depend on V8.
10 component("gin_features") { 11 component("gin_features") {
11 sources = [ 12 sources = [
12 "gin_features.cc", 13 "gin_features.cc",
13 "gin_features_export.h", 14 "gin_features_export.h",
14 "public/gin_features.h", 15 "public/gin_features.h",
15 ] 16 ]
16 17
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ] 89 ]
89 90
90 if (v8_use_external_startup_data) { 91 if (v8_use_external_startup_data) {
91 data = [ 92 data = [
92 "$root_out_dir/natives_blob.bin", 93 "$root_out_dir/natives_blob.bin",
93 "$root_out_dir/snapshot_blob.bin", 94 "$root_out_dir/snapshot_blob.bin",
94 ] 95 ]
95 } 96 }
96 97
97 defines = [ "GIN_IMPLEMENTATION" ] 98 defines = [ "GIN_IMPLEMENTATION" ]
98
99 public_deps = [ 99 public_deps = [
100 "//base", 100 "//base",
101 "//v8", 101 "//v8",
102 ] 102 ]
103
103 deps = [ 104 deps = [
104 ":gin_features", 105 ":gin_features",
105 "//base/third_party/dynamic_annotations", 106 "//base/third_party/dynamic_annotations",
106 "//crypto", 107 "//crypto",
107 ] 108 ]
108 109
109 if (is_mac) { 110 if (is_mac) {
110 libs = [ "CoreFoundation.framework" ] 111 libs = [ "CoreFoundation.framework" ]
111 } 112 }
112 113
(...skipping 10 matching lines...) Expand all
123 "//base", 124 "//base",
124 "//base:i18n", 125 "//base:i18n",
125 "//build/config/sanitizers:deps", 126 "//build/config/sanitizers:deps",
126 "//build/win:default_exe_manifest", 127 "//build/win:default_exe_manifest",
127 "//v8", 128 "//v8",
128 ] 129 ]
129 130
130 configs += [ "//v8:external_startup_data" ] 131 configs += [ "//v8:external_startup_data" ]
131 } 132 }
132 133
134 if (current_toolchain == v8_snapshot_toolchain) {
135 action("run_gin_blink_snapshot") {
136 script = "run.py"
137 exec = "$root_out_dir/gin_blink_snapshot"
138 output_file = "$root_out_dir/context_blob.bin"
139 output_path = rebase_path(output_file, root_build_dir)
140
141 args = [
142 rebase_path(exec, root_build_dir),
143 "--output_file=$output_path",
144 ]
145
146 outputs = [
147 output_file,
148 ]
149
150 deps = [
151 ":gin_blink_snapshot($host_toolchain)",
152 ]
153 }
154 }
155
156 config("noicf") {
157 if (is_win) {
158 ldflags = [ "/OPT:NOICF" ]
159 } else if (is_posix && !is_mac) {
160 ldflags = [ "-Wl,--icf=none" ]
161 }
162 }
163
164 executable("gin_blink_snapshot") {
165 sources = [
166 "shell/gin_prepare_main.cc",
167 ]
168
169 deps = [
170 ":gin",
171 "//mojo/edk/system:system",
172 "//third_party/WebKit/public:blink",
173 ]
174
175 configs += [
176 "//v8:external_startup_data",
177 ":noicf",
178 ]
179 }
180
133 source_set("gin_test") { 181 source_set("gin_test") {
134 testonly = true 182 testonly = true
135 sources = [ 183 sources = [
136 "test/file.cc", 184 "test/file.cc",
137 "test/file.h", 185 "test/file.h",
138 "test/file_runner.cc", 186 "test/file_runner.cc",
139 "test/file_runner.h", 187 "test/file_runner.h",
140 "test/gc.cc", 188 "test/gc.cc",
141 "test/gc.h", 189 "test/gc.h",
142 "test/gtest.cc", 190 "test/gtest.cc",
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 "shell/hello_world.js", 239 "shell/hello_world.js",
192 "test/file_unittests.js", 240 "test/file_unittests.js",
193 "test/gtest_unittests.js", 241 "test/gtest_unittests.js",
194 "../OWNERS", 242 "../OWNERS",
195 ] 243 ]
196 244
197 data_deps = [ 245 data_deps = [
198 ":gin_shell", 246 ":gin_shell",
199 ] 247 ]
200 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698