OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("//v8/gni/v8.gni") | 6 import("//v8/gni/v8.gni") |
| 7 import("//v8/snapshot_toolchain.gni") |
7 | 8 |
8 # This is depended upon from the browser DLL on Windows, where V8 is not used, | 9 # This is depended upon from the browser DLL on Windows, where V8 is not used, |
9 # but features are enabled. This cannot depend on V8. | 10 # but features are enabled. This cannot depend on V8. |
10 component("gin_features") { | 11 component("gin_features") { |
11 sources = [ | 12 sources = [ |
12 "gin_features.cc", | 13 "gin_features.cc", |
13 "gin_features_export.h", | 14 "gin_features_export.h", |
14 "public/gin_features.h", | 15 "public/gin_features.h", |
15 ] | 16 ] |
16 | 17 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 ] | 89 ] |
89 | 90 |
90 if (v8_use_external_startup_data) { | 91 if (v8_use_external_startup_data) { |
91 data = [ | 92 data = [ |
92 "$root_out_dir/natives_blob.bin", | 93 "$root_out_dir/natives_blob.bin", |
93 "$root_out_dir/snapshot_blob.bin", | 94 "$root_out_dir/snapshot_blob.bin", |
94 ] | 95 ] |
95 } | 96 } |
96 | 97 |
97 defines = [ "GIN_IMPLEMENTATION" ] | 98 defines = [ "GIN_IMPLEMENTATION" ] |
98 | |
99 public_deps = [ | 99 public_deps = [ |
100 "//base", | 100 "//base", |
101 "//v8", | 101 "//v8", |
102 ] | 102 ] |
| 103 |
103 deps = [ | 104 deps = [ |
104 ":gin_features", | 105 ":gin_features", |
105 "//base/third_party/dynamic_annotations", | 106 "//base/third_party/dynamic_annotations", |
106 "//crypto", | 107 "//crypto", |
107 ] | 108 ] |
108 | 109 |
109 if (is_mac) { | 110 if (is_mac) { |
110 libs = [ "CoreFoundation.framework" ] | 111 libs = [ "CoreFoundation.framework" ] |
111 } | 112 } |
112 | 113 |
(...skipping 10 matching lines...) Expand all Loading... |
123 "//base", | 124 "//base", |
124 "//base:i18n", | 125 "//base:i18n", |
125 "//build/config/sanitizers:deps", | 126 "//build/config/sanitizers:deps", |
126 "//build/win:default_exe_manifest", | 127 "//build/win:default_exe_manifest", |
127 "//v8", | 128 "//v8", |
128 ] | 129 ] |
129 | 130 |
130 configs += [ "//v8:external_startup_data" ] | 131 configs += [ "//v8:external_startup_data" ] |
131 } | 132 } |
132 | 133 |
| 134 if (current_toolchain == v8_snapshot_toolchain) { |
| 135 action("run_gin_blink_snapshot") { |
| 136 script = "run.py" |
| 137 exec = "$root_out_dir/gin_blink_snapshot" |
| 138 output_file = "$root_out_dir/context_blob.bin" |
| 139 output_path = rebase_path(output_file, root_build_dir) |
| 140 |
| 141 args = [ |
| 142 rebase_path(exec, root_build_dir), |
| 143 "--output_file=$output_path", |
| 144 ] |
| 145 |
| 146 outputs = [ |
| 147 output_file, |
| 148 ] |
| 149 |
| 150 deps = [ |
| 151 ":gin_blink_snapshot($v8_snapshot_toolchain)", |
| 152 ] |
| 153 } |
| 154 } |
| 155 |
| 156 # This config disables a link time optimization which merge some pointers, |
| 157 # but we must keep duplicated entries in external references for V8 snapshot. |
| 158 config("disable_icf") { |
| 159 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 160 if (is_win) { |
| 161 ldflags = [ "/OPT:NOICF" ] |
| 162 } else if (is_posix && !is_mac) { |
| 163 ldflags = [ "-Wl,--icf=none" ] |
| 164 } |
| 165 } |
| 166 |
| 167 executable("gin_blink_snapshot") { |
| 168 sources = [ |
| 169 "shell/gin_prepare_main.cc", |
| 170 ] |
| 171 |
| 172 deps = [ |
| 173 ":gin", |
| 174 "//mojo/edk/system:system", |
| 175 "//third_party/WebKit/public:blink", |
| 176 ] |
| 177 |
| 178 configs += [ |
| 179 "//v8:external_startup_data", |
| 180 ":disable_icf", |
| 181 ] |
| 182 } |
| 183 |
133 source_set("gin_test") { | 184 source_set("gin_test") { |
134 testonly = true | 185 testonly = true |
135 sources = [ | 186 sources = [ |
136 "test/file.cc", | 187 "test/file.cc", |
137 "test/file.h", | 188 "test/file.h", |
138 "test/file_runner.cc", | 189 "test/file_runner.cc", |
139 "test/file_runner.h", | 190 "test/file_runner.h", |
140 "test/gc.cc", | 191 "test/gc.cc", |
141 "test/gc.h", | 192 "test/gc.h", |
142 "test/gtest.cc", | 193 "test/gtest.cc", |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 "shell/hello_world.js", | 243 "shell/hello_world.js", |
193 "test/file_unittests.js", | 244 "test/file_unittests.js", |
194 "test/gtest_unittests.js", | 245 "test/gtest_unittests.js", |
195 "../OWNERS", | 246 "../OWNERS", |
196 ] | 247 ] |
197 | 248 |
198 data_deps = [ | 249 data_deps = [ |
199 ":gin_shell", | 250 ":gin_shell", |
200 ] | 251 ] |
201 } | 252 } |
OLD | NEW |