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

Side by Side Diff: BUILD.gn

Issue 327703004: Revert "Port 'external startup data' flag from gyp to gn." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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
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 # TODO(jochen): These will need to be user-settable to support standalone V8 5 # TODO(jochen): These will need to be user-settable to support standalone V8
6 # builds. 6 # builds.
7 v8_compress_startup_data = "off" 7 v8_compress_startup_data = "off"
8 v8_deprecation_warnings = false 8 v8_deprecation_warnings = false
9 v8_enable_disassembler = false 9 v8_enable_disassembler = false
10 v8_enable_gdbjit = false 10 v8_enable_gdbjit = false
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 ] 211 ]
212 212
213 outputs = [ 213 outputs = [
214 "$target_gen_dir/libraries.cc" 214 "$target_gen_dir/libraries.cc"
215 ] 215 ]
216 216
217 if (v8_enable_i18n_support) { 217 if (v8_enable_i18n_support) {
218 sources += [ "src/i18n.js" ] 218 sources += [ "src/i18n.js" ]
219 } 219 }
220 220
221 args = [ 221 args =
222 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), 222 rebase_path(outputs, root_build_dir) +
223 "CORE", 223 [ "CORE", v8_compress_startup_data ] +
224 v8_compress_startup_data 224 rebase_path(sources, root_build_dir)
225 ] + rebase_path(sources, root_build_dir)
226
227 if (v8_use_external_startup_data) {
228 outputs += [ "$target_gen_dir/libraries.bin" ]
229 args += [
230 "--startup_blob",
231 rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
232 ]
233 }
234 } 225 }
235 226
236 action("js2c_experimental") { 227 action("js2c_experimental") {
237 visibility = ":*" # Only targets in this file can depend on this. 228 visibility = ":*" # Only targets in this file can depend on this.
238 229
239 script = "tools/js2c.py" 230 script = "tools/js2c.py"
240 231
241 # The script depends on this other script, this rule causes a rebuild if it 232 # The script depends on this other script, this rule causes a rebuild if it
242 # changes. 233 # changes.
243 source_prereqs = [ "tools/jsmin.py" ] 234 source_prereqs = [ "tools/jsmin.py" ]
244 235
245 sources = [ 236 sources = [
246 "src/macros.py", 237 "src/macros.py",
247 "src/symbol.js", 238 "src/symbol.js",
248 "src/proxy.js", 239 "src/proxy.js",
249 "src/collection.js", 240 "src/collection.js",
250 "src/collection-iterator.js", 241 "src/collection-iterator.js",
251 "src/generator.js", 242 "src/generator.js",
252 "src/array-iterator.js", 243 "src/array-iterator.js",
253 "src/harmony-string.js", 244 "src/harmony-string.js",
254 "src/harmony-array.js", 245 "src/harmony-array.js",
255 "src/harmony-math.js", 246 "src/harmony-math.js",
256 ] 247 ]
257 248
258 outputs = [ 249 outputs = [
259 "$target_gen_dir/experimental-libraries.cc" 250 "$target_gen_dir/experimental-libraries.cc"
260 ] 251 ]
261 252
262 args = [ 253 args =
263 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir), 254 rebase_path(outputs, root_build_dir) +
264 "EXPERIMENTAL", 255 [ "EXPERIMENTAL", v8_compress_startup_data ] +
265 v8_compress_startup_data 256 rebase_path(sources, root_build_dir)
266 ] + rebase_path(sources, root_build_dir)
267
268 if (v8_use_external_startup_data) {
269 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
270 args += [
271 "--startup_blob",
272 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
273 ]
274 }
275 }
276
277 action("natives_blob") {
278 visibility = ":*" # Only targets in this file can depend on this.
279
280 deps = [
281 ":js2c",
282 ":js2c_experimental"
283 ]
284
285 sources = [
286 "$target_gen_dir/libraries.bin",
287 "$target_gen_dir/libraries_experimental.bin"
288 ]
289
290 outputs = [
291 "$root_gen_dir/natives_blob.bin"
292 ]
293
294 script = "tools/concatenate-files.py"
295
296 args = rebase_path(sources + outputs, root_build_dir)
297 } 257 }
298 258
299 action("postmortem-metadata") { 259 action("postmortem-metadata") {
300 visibility = ":*" # Only targets in this file can depend on this. 260 visibility = ":*" # Only targets in this file can depend on this.
301 261
302 script = "tools/gen-postmortem-metadata.py" 262 script = "tools/gen-postmortem-metadata.py"
303 263
304 sources = [ 264 sources = [
305 "src/objects.h", 265 "src/objects.h",
306 "src/objects-inl.h", 266 "src/objects-inl.h",
(...skipping 17 matching lines...) Expand all
324 284
325 outputs = [ 285 outputs = [
326 "$target_gen_dir/snapshot.cc" 286 "$target_gen_dir/snapshot.cc"
327 ] 287 ]
328 288
329 args = [ 289 args = [
330 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", 290 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)",
331 "root_out_dir") + "/mksnapshot", 291 "root_out_dir") + "/mksnapshot",
332 root_build_dir), 292 root_build_dir),
333 "--log-snapshot-positions", 293 "--log-snapshot-positions",
334 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir), 294 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir)
335 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
336 ] 295 ]
337 296
338 if (v8_random_seed != "0") { 297 if (v8_random_seed != "0") {
339 args += [ "--random-seed", v8_random_seed ] 298 args += [ "--random-seed", v8_random_seed ]
340 } 299 }
341 300
342 if (v8_use_external_startup_data) { 301 args += rebase_path(outputs, root_build_dir)
343 outputs += [ "$root_gen_dir/snapshot_blob.bin" ]
344 args += [
345 "--startup_blob",
346 rebase_path("$root_gen_dir/snapshot_blob.bin", root_build_dir)
347 ]
348 }
349 } 302 }
350 303
351 304
352 ############################################################################### 305 ###############################################################################
353 # Source Sets (aka static libraries) 306 # Source Sets (aka static libraries)
354 # 307 #
355 308
356 source_set("v8_nosnapshot") { 309 source_set("v8_nosnapshot") {
357 visibility = ":*" # Only targets in this file can depend on this. 310 visibility = ":*" # Only targets in this file can depend on this.
358 311
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 "$target_gen_dir/trig-table.cc", 346 "$target_gen_dir/trig-table.cc",
394 "$target_gen_dir/snapshot.cc", 347 "$target_gen_dir/snapshot.cc",
395 "src/snapshot-common.cc", 348 "src/snapshot-common.cc",
396 ] 349 ]
397 350
398 configs -= [ "//build/config/compiler:chromium_code" ] 351 configs -= [ "//build/config/compiler:chromium_code" ]
399 configs += [ "//build/config/compiler:no_chromium_code" ] 352 configs += [ "//build/config/compiler:no_chromium_code" ]
400 configs += [ ":internal_config", ":features", ":toolchain" ] 353 configs += [ ":internal_config", ":features", ":toolchain" ]
401 } 354 }
402 355
403 source_set("v8_external_snapshot") {
404 visibility = ":*" # Only targets in this file can depend on this.
405
406 deps = [
407 ":js2c",
408 ":js2c_experimental",
409 ":generate_trig_table",
410 ":run_mksnapshot",
411 ":v8_base",
412 ":natives_blob",
413 ]
414
415 sources = [
416 "$target_gen_dir/trig-table.cc",
417 "src/natives-external.cc",
418 "src/snapshot-external.cc",
419 ]
420
421 configs -= [ "//build/config/compiler:chromium_code" ]
422 configs += [ "//build/config/compiler:no_chromium_code" ]
423 configs += [ ":internal_config", ":features", ":toolchain" ]
424 }
425
426 source_set("v8_base") { 356 source_set("v8_base") {
427 visibility = ":*" # Only targets in this file can depend on this. 357 visibility = ":*" # Only targets in this file can depend on this.
428 358
429 sources = [ 359 sources = [
430 "src/accessors.cc", 360 "src/accessors.cc",
431 "src/accessors.h", 361 "src/accessors.h",
432 "src/allocation.cc", 362 "src/allocation.cc",
433 "src/allocation.h", 363 "src/allocation.h",
434 "src/allocation-site-scopes.cc", 364 "src/allocation-site-scopes.cc",
435 "src/allocation-site-scopes.h", 365 "src/allocation-site-scopes.h",
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 # Public targets 1017 # Public targets
1088 # 1018 #
1089 1019
1090 if (component_mode == "shared_library") { 1020 if (component_mode == "shared_library") {
1091 1021
1092 component("v8") { 1022 component("v8") {
1093 sources = [ 1023 sources = [
1094 "src/v8dll-main.cc", 1024 "src/v8dll-main.cc",
1095 ] 1025 ]
1096 1026
1097 if (v8_use_external_startup_data) { 1027 if (v8_use_snapshot) {
1098 deps = [
1099 ":v8_base",
1100 ":v8_external_snapshot",
1101 ]
1102 } else if (v8_use_snapshot) {
1103 deps = [ 1028 deps = [
1104 ":v8_base", 1029 ":v8_base",
1105 ":v8_snapshot", 1030 ":v8_snapshot",
1106 ] 1031 ]
1107 } else { 1032 } else {
1108 deps = [ 1033 deps = [
1109 ":v8_base", 1034 ":v8_base",
1110 ":v8_nosnapshot", 1035 ":v8_nosnapshot",
1111 ] 1036 ]
1112 } 1037 }
1113 1038
1114 configs -= [ "//build/config/compiler:chromium_code" ] 1039 configs -= [ "//build/config/compiler:chromium_code" ]
1115 configs += [ "//build/config/compiler:no_chromium_code" ] 1040 configs += [ "//build/config/compiler:no_chromium_code" ]
1116 configs += [ ":internal_config", ":features", ":toolchain" ] 1041 configs += [ ":internal_config", ":features", ":toolchain" ]
1117 1042
1118 direct_dependent_configs = [ ":external_config" ] 1043 direct_dependent_configs = [ ":external_config" ]
1119 1044
1120 if (is_android && current_toolchain != host_toolchain) { 1045 if (is_android && current_toolchain != host_toolchain) {
1121 libs += [ "log" ] 1046 libs += [ "log" ]
1122 } 1047 }
1123 } 1048 }
1124 1049
1125 } else { 1050 } else {
1126 1051
1127 group("v8") { 1052 group("v8") {
1128 if (v8_use_external_startup_data) { 1053 if (v8_use_snapshot) {
1129 deps = [
1130 ":v8_base",
1131 ":v8_external_snapshot",
1132 ]
1133 } else if (v8_use_snapshot) {
1134 deps = [ 1054 deps = [
1135 ":v8_base", 1055 ":v8_base",
1136 ":v8_snapshot", 1056 ":v8_snapshot",
1137 ] 1057 ]
1138 } else { 1058 } else {
1139 deps = [ 1059 deps = [
1140 ":v8_base", 1060 ":v8_base",
1141 ":v8_nosnapshot", 1061 ":v8_nosnapshot",
1142 ] 1062 ]
1143 } 1063 }
1144 1064
1145 direct_dependent_configs = [ ":external_config" ] 1065 direct_dependent_configs = [ ":external_config" ]
1146 } 1066 }
1147 1067
1148 } 1068 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698