| Index: gin/BUILD.gn
|
| diff --git a/gin/BUILD.gn b/gin/BUILD.gn
|
| index eaf88a8c77da16cc5e773b3f2dc5dca8ab85157c..d6b5a3b6089e7b95565a2e2940a635bc6aef6376 100644
|
| --- a/gin/BUILD.gn
|
| +++ b/gin/BUILD.gn
|
| @@ -77,11 +77,11 @@ component("gin") {
|
| }
|
|
|
| defines = [ "GIN_IMPLEMENTATION" ]
|
| -
|
| public_deps = [
|
| "//base",
|
| "//v8",
|
| ]
|
| +
|
| deps = [
|
| "//base/third_party/dynamic_annotations",
|
| ]
|
| @@ -110,6 +110,65 @@ executable("gin_shell") {
|
| configs += [ "//v8:external_startup_data" ]
|
| }
|
|
|
| +group("blink_v8_snapshot") {
|
| + public_deps = [
|
| + ":generate_blink_v8_snapshot",
|
| + ]
|
| +}
|
| +
|
| +action("generate_blink_v8_snapshot") {
|
| + script = "run.py"
|
| + output_file = "$root_out_dir/blink_v8_snapshot.bin"
|
| + output_path = rebase_path(output_file, root_build_dir)
|
| +
|
| + args = [
|
| + "./" + rebase_path(
|
| + get_label_info(":blink_v8_snapshot_generator($host_toolchain)",
|
| + "root_out_dir") + "/blink_v8_snapshot_generator",
|
| + root_build_dir),
|
| + "--output_file=$output_path",
|
| + ]
|
| +
|
| + outputs = [
|
| + output_file,
|
| + ]
|
| +
|
| + deps = [
|
| + ":blink_v8_snapshot_generator($host_toolchain)",
|
| + ]
|
| +}
|
| +
|
| +# This config disables a link time optimization "ICF", which may merge different
|
| +# functions into one if the function signature and body of them are identical.
|
| +config("disable_icf") {
|
| + visibility = [ ":*" ] # Only targets in this file can depend on this.
|
| + if (is_win) {
|
| + ldflags = [ "/OPT:NOICF" ]
|
| + } else if (is_posix && !is_mac) {
|
| + ldflags = [ "-Wl,--icf=none" ]
|
| + }
|
| +}
|
| +
|
| +executable("blink_v8_snapshot_generator") {
|
| + sources = [
|
| + "shell/blink_v8_snapshot_generator_main.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":gin",
|
| + "//mojo/edk/system:system",
|
| + "//third_party/WebKit/public:blink",
|
| + "//v8",
|
| + ]
|
| +
|
| + # Link time optimization "ICF" breaks 1:1 mappings of the external references
|
| + # for V8 snapshot. So, we disable it while taking a V8 snapshot.
|
| + configs += [
|
| + "//v8:external_startup_data",
|
| + ":disable_icf",
|
| + ]
|
| +}
|
| +
|
| source_set("gin_test") {
|
| testonly = true
|
| sources = [
|
|
|