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

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

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Move snapshot maker to tools/ and work for comments 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 group("blink_v8_snapshot") {
6 public_deps = [
7 ":generate_blink_v8_snapshot",
8 ]
9 }
10
11 action("generate_blink_v8_snapshot") {
12 script = "run.py"
13 output_file = "$root_out_dir/blink_v8_snapshot.bin"
14 output_path = rebase_path(output_file, root_build_dir)
15
16 args = [
17 "./" + rebase_path(
18 get_label_info(":blink_v8_snapshot_generator($host_toolchain)",
19 "root_out_dir") + "/blink_v8_snapshot_generator",
20 root_build_dir),
21 "--output_file=$output_path",
22 ]
23
24 outputs = [
25 output_file,
26 ]
27
28 deps = [
29 ":blink_v8_snapshot_generator($host_toolchain)",
30 ]
31 }
32
33 # This config disables a link time optimization "ICF", which may merge different
34 # functions into one if the function signature and body of them are identical.
35 config("disable_icf") {
36 visibility = [ ":*" ] # Only targets in this file can depend on this.
37 if (is_win) {
38 ldflags = [ "/OPT:NOICF" ]
39 } else if (is_posix && !is_mac) {
40 ldflags = [ "-Wl,--icf=none" ]
41 }
42 }
43
44 executable("blink_v8_snapshot_generator") {
45 sources = [
46 "blink_v8_snapshot_generator.cc",
47 ]
48
49 deps = [
50 "//gin:gin",
51 "//mojo/edk/system:system",
52 "//third_party/WebKit/public:blink",
53 "//v8",
54 ]
55
56 # Link time optimization "ICF" breaks 1:1 mappings of the external references
57 # for V8 snapshot. So, we disable it while taking a V8 snapshot.
58 configs += [
59 "//v8:external_startup_data",
60 ":disable_icf",
61 ]
62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698