| Index: gin/BUILD.gn
|
| diff --git a/gin/BUILD.gn b/gin/BUILD.gn
|
| index e5b6d9ebc5c9d8b4ebc89153df125cc6a2078a87..daacba38dd1e54e44c324492ee1b5467a76591f8 100644
|
| --- a/gin/BUILD.gn
|
| +++ b/gin/BUILD.gn
|
| @@ -4,6 +4,7 @@
|
|
|
| import("//testing/test.gni")
|
| import("//v8/gni/v8.gni")
|
| +import("//v8/snapshot_toolchain.gni")
|
|
|
| # This is depended upon from the browser DLL on Windows, where V8 is not used,
|
| # but features are enabled. This cannot depend on V8.
|
| @@ -95,11 +96,11 @@ component("gin") {
|
| }
|
|
|
| defines = [ "GIN_IMPLEMENTATION" ]
|
| -
|
| public_deps = [
|
| "//base",
|
| "//v8",
|
| ]
|
| +
|
| deps = [
|
| ":gin_features",
|
| "//base/third_party/dynamic_annotations",
|
| @@ -130,6 +131,53 @@ executable("gin_shell") {
|
| configs += [ "//v8:external_startup_data" ]
|
| }
|
|
|
| +if (current_toolchain == v8_snapshot_toolchain) {
|
| + action("run_gin_blink_snapshot") {
|
| + script = "run.py"
|
| + exec = "$root_out_dir/gin_blink_snapshot"
|
| + 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",
|
| + ]
|
| +}
|
| +
|
| source_set("gin_test") {
|
| testonly = true
|
| sources = [
|
|
|