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

Unified Diff: gin/BUILD.gn

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: . Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: gin/BUILD.gn
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
index e5b6d9ebc5c9d8b4ebc89153df125cc6a2078a87..feb2efb341e6f4704031f3f48dcc0bb86b881b18 100644
--- a/gin/BUILD.gn
+++ b/gin/BUILD.gn
@@ -95,11 +95,11 @@ component("gin") {
}
defines = [ "GIN_IMPLEMENTATION" ]
-
public_deps = [
"//base",
"//v8",
]
+
deps = [
":gin_features",
"//base/third_party/dynamic_annotations",
@@ -130,6 +130,51 @@ executable("gin_shell") {
configs += [ "//v8:external_startup_data" ]
}
+action("run_gin_blink_snapshot") {
+ script = "run.py"
+ 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.
+ output_file = "$root_out_dir/context_blob.bin"
+ output_path = rebase_path(output_file, root_build_dir)
+
+ args = [
+ rebase_path(exec, root_build_dir),
+ "--output_file=$output_path",
+ ]
+
+ outputs = [
+ output_file,
+ ]
+
+ deps = [
+ ":gin_blink_snapshot($host_toolchain)",
+ ]
+}
+
+config("noicf") {
+ if (is_win) {
+ ldflags = [ "/OPT:NOICF" ]
+ } else if (is_posix && !is_mac) {
+ ldflags = [ "-Wl,--icf=none" ]
+ }
+}
+
+executable("gin_blink_snapshot") {
+ sources = [
+ "shell/gin_prepare_main.cc",
+ ]
+
+ deps = [
+ ":gin",
+ "//mojo/edk/system:system",
+ "//third_party/WebKit/public:blink",
+ ]
+
+ configs += [
+ "//v8:external_startup_data",
+ ":noicf",
Yuki 2017/04/28 13:48:27 Better to comment why we need :noicf.
peria 2017/06/20 10:20:13 Done.
+ ]
+}
+
source_set("gin_test") {
testonly = true
sources = [

Powered by Google App Engine
This is Rietveld 408576698