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

Side by Side Diff: tools/blink_v8_snapshot/BUILD.gn

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Disable on ChromeOS and reduce size of table Created 3 years, 5 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
(Empty)
1 # Copyright 2017 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("//v8/snapshot_toolchain.gni")
6
7 if (is_android) {
8 import("//build/config/android/rules.gni")
9 }
10
11 if (is_android) {
12 android_assets("blink_v8_snapshot_assets") {
13 deps = [
14 ":blink_v8_snapshot",
15 ]
16 sources = [
17 "$root_out_dir/blink_v8_snapshot.bin",
18 ]
19 disable_compression = true
20 }
21 }
22
23 group("blink_v8_snapshot") {
24 if (!is_chromeos) {
25 public_deps = [
26 ":generate_blink_v8_snapshot",
27 ]
28 }
29 }
30
31 if (!is_chromeos) {
32 action("generate_blink_v8_snapshot") {
33 script = "run.py"
34 output_file = "$root_out_dir/blink_v8_snapshot.bin"
35 output_path = rebase_path(output_file, root_build_dir)
36
37 args = [
38 "./" + rebase_path(
39 get_label_info(
40 ":blink_v8_snapshot_generator($v8_snapshot_toolchain)",
41 "root_out_dir") + "/blink_v8_snapshot_generator",
42 root_build_dir),
43 "--output_file=$output_path",
44 ]
45
46 outputs = [
47 output_file,
48 ]
49
50 deps = [
51 ":blink_v8_snapshot_generator($v8_snapshot_toolchain)",
52 ]
53 }
54
55 # This config disables a link time optimization "ICF", which may merge differe nt
56 # functions into one if the function signature and body of them are identical.
57 config("disable_icf") {
58 visibility = [ ":*" ] # Only targets in this file can depend on this.
59 if (is_win) {
60 ldflags = [ "/OPT:NOICF" ]
61 } else if (is_posix && !is_mac) {
62 ldflags = [ "-Wl,--icf=none" ]
63 }
64 }
65
66 executable("blink_v8_snapshot_generator") {
67 sources = [
68 "blink_v8_snapshot_generator.cc",
69 ]
70
71 deps = [
72 "//gin:gin",
73 "//mojo/edk/system:system",
74 "//third_party/WebKit/public:blink",
75 "//v8",
76 ]
77
78 # Link time optimization "ICF" breaks 1:1 mappings of the external reference s
79 # for V8 snapshot. So, we disable it while taking a V8 snapshot.
80 configs += [
81 "//v8:external_startup_data",
82 ":disable_icf",
83 ]
84 }
85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698