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

Side by Side Diff: runtime/BUILD.gn

Issue 2975343002: Add libdart PRODUCT targets for Fuchsia's dart_runner (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | runtime/bin/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 import("runtime_args.gni") 5 import("runtime_args.gni")
6 6
7 config("dart_public_config") { 7 config("dart_public_config") {
8 include_dirs = [ "." ] 8 include_dirs = [ "." ]
9 } 9 }
10 10
11 # Adds PRODUCT define if Flutter has specified "release" for dart_runtime_mode 11 # Adds PRODUCT define if Flutter has specified "release" for dart_runtime_mode
12 config("dart_maybe_product_config") { 12 config("dart_maybe_product_config") {
13 defines = [] 13 defines = []
14 14
15 if (dart_runtime_mode != "develop" && dart_runtime_mode != "profile" && 15 if (dart_runtime_mode != "develop" && dart_runtime_mode != "profile" &&
16 dart_runtime_mode != "release") { 16 dart_runtime_mode != "release") {
17 print("Invalid |dart_runtime_mode|") 17 print("Invalid |dart_runtime_mode|")
18 assert(false) 18 assert(false)
19 } 19 }
20 20
21 if (dart_runtime_mode == "release") { 21 if (dart_runtime_mode == "release") {
22 if (dart_debug) { 22 if (dart_debug) {
23 print("Debug and release mode are mutually exclusive.") 23 print("Debug and release mode are mutually exclusive.")
24 } 24 }
25 assert(!dart_debug) 25 assert(!dart_debug)
26 defines += [ "PRODUCT" ] 26 defines += [ "PRODUCT" ]
27 } 27 }
28 } 28 }
29 29
30 # This is a config to use to build PRODUCT mode artifacts in a RELEASE build.
31 # If a DEBUG build has been specified it will be ignored.
32 config("dart_product_config") {
33 defines = []
34 if (!dart_debug) {
35 defines += [ "PRODUCT" ]
36 }
37 }
38
30 config("dart_precompiled_runtime_config") { 39 config("dart_precompiled_runtime_config") {
31 defines = [] 40 defines = []
32 defines += [ "DART_PRECOMPILED_RUNTIME" ] 41 defines += [ "DART_PRECOMPILED_RUNTIME" ]
33 } 42 }
34 43
35 # Controls DART_PRECOMPILER #define. 44 # Controls DART_PRECOMPILER #define.
36 config("dart_precompiler_config") { 45 config("dart_precompiler_config") {
37 defines = [] 46 defines = []
38 defines += [ "DART_PRECOMPILER" ] 47 defines += [ "DART_PRECOMPILER" ]
39 } 48 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 template("libdart_library") { 163 template("libdart_library") {
155 extra_configs = [] 164 extra_configs = []
156 if (defined(invoker.extra_configs)) { 165 if (defined(invoker.extra_configs)) {
157 extra_configs += invoker.extra_configs 166 extra_configs += invoker.extra_configs
158 } 167 }
159 extra_deps = [] 168 extra_deps = []
160 if (defined(invoker.extra_deps)) { 169 if (defined(invoker.extra_deps)) {
161 extra_deps += invoker.extra_deps 170 extra_deps += invoker.extra_deps
162 } 171 }
163 static_library(target_name) { 172 static_library(target_name) {
164 configs += [ 173 configs += [ ":dart_config" ] + extra_configs
165 ":dart_config",
166 ":dart_maybe_product_config",
167 ] + extra_configs
168 if (is_fuchsia) { 174 if (is_fuchsia) {
169 configs -= [ "//build/config:symbol_visibility_hidden" ] 175 configs -= [ "//build/config:symbol_visibility_hidden" ]
170 } 176 }
171 deps = [ 177 deps = [
172 "vm:libdart_platform",
173 "third_party/double-conversion/src:libdouble_conversion", 178 "third_party/double-conversion/src:libdouble_conversion",
174 ":generate_version_cc_file", 179 ":generate_version_cc_file",
175 ] + extra_deps 180 ] + extra_deps
176 include_dirs = [ "." ] 181 include_dirs = [ "." ]
177 public_configs = [ ":dart_public_config" ] 182 public_configs = [ ":dart_public_config" ]
178 sources = [ 183 sources = [
179 "$target_gen_dir/version.cc", 184 "$target_gen_dir/version.cc",
180 "include/dart_api.h", 185 "include/dart_api.h",
181 "include/dart_mirrors_api.h", 186 "include/dart_mirrors_api.h",
182 "include/dart_native_api.h", 187 "include/dart_native_api.h",
183 "include/dart_tools_api.h", 188 "include/dart_tools_api.h",
184 "vm/dart_api_impl.cc", 189 "vm/dart_api_impl.cc",
185 "vm/debugger_api_impl.cc", 190 "vm/debugger_api_impl.cc",
186 "vm/mirrors_api_impl.cc", 191 "vm/mirrors_api_impl.cc",
187 "vm/native_api_impl.cc", 192 "vm/native_api_impl.cc",
188 "vm/version.h", 193 "vm/version.h",
189 ] 194 ]
190 defines = [ "DART_SHARED_LIB" ] 195 defines = [ "DART_SHARED_LIB" ]
191 } 196 }
192 } 197 }
193 198
194 libdart_library("libdart_jit") { 199 libdart_library("libdart_jit") {
195 extra_deps = [ 200 extra_deps = [
201 "vm:libdart_platform",
196 "vm:libdart_lib_jit", 202 "vm:libdart_lib_jit",
197 "vm:libdart_vm_jit", 203 "vm:libdart_vm_jit",
198 ] 204 ]
199 } 205 }
200 206
207 libdart_library("libdart_jit_product") {
208 extra_configs = [ ":dart_product_config" ]
209 extra_deps = [
210 "vm:libdart_platform_product",
211 "vm:libdart_lib_jit_product",
212 "vm:libdart_vm_jit_product",
213 ]
214 }
215
201 libdart_library("libdart_precompiled_runtime") { 216 libdart_library("libdart_precompiled_runtime") {
202 extra_configs = [ ":dart_precompiled_runtime_config" ] 217 extra_configs = [
218 ":dart_maybe_product_config",
219 ":dart_precompiled_runtime_config",
220 ]
203 extra_deps = [ 221 extra_deps = [
222 "vm:libdart_platform",
204 "vm:libdart_lib_precompiled_runtime", 223 "vm:libdart_lib_precompiled_runtime",
205 "vm:libdart_vm_precompiled_runtime", 224 "vm:libdart_vm_precompiled_runtime",
206 ] 225 ]
207 } 226 }
208 227
228 libdart_library("libdart_precompiled_runtime_product") {
229 extra_configs = [
230 ":dart_product_config",
231 ":dart_precompiled_runtime_config",
232 ]
233 extra_deps = [
234 "vm:libdart_platform_product",
235 "vm:libdart_lib_precompiled_runtime_product",
236 "vm:libdart_vm_precompiled_runtime_product",
237 ]
238 }
239
209 libdart_library("libdart_nosnapshot_with_precompiler") { 240 libdart_library("libdart_nosnapshot_with_precompiler") {
210 extra_configs = [ 241 extra_configs = [
242 ":dart_maybe_product_config",
211 ":dart_no_snapshot_config", 243 ":dart_no_snapshot_config",
212 ":dart_precompiler_config", 244 ":dart_precompiler_config",
213 ] 245 ]
214 extra_deps = [ 246 extra_deps = [
247 "vm:libdart_platform",
215 "vm:libdart_lib_nosnapshot_with_precompiler", 248 "vm:libdart_lib_nosnapshot_with_precompiler",
216 "vm:libdart_vm_nosnapshot_with_precompiler", 249 "vm:libdart_vm_nosnapshot_with_precompiler",
217 ] 250 ]
218 } 251 }
219 252
253 libdart_library("libdart_nosnapshot_with_precompiler_product") {
254 extra_configs = [
255 ":dart_product_config",
256 ":dart_no_snapshot_config",
257 ":dart_precompiler_config",
258 ]
259 extra_deps = [
260 "vm:libdart_platform_product",
261 "vm:libdart_lib_nosnapshot_with_precompiler_product",
262 "vm:libdart_vm_nosnapshot_with_precompiler_product",
263 ]
264 }
265
220 libdart_library("libdart_with_precompiler") { 266 libdart_library("libdart_with_precompiler") {
221 extra_configs = [ ":dart_precompiler_config" ] 267 extra_configs = [
268 ":dart_maybe_product_config",
269 ":dart_precompiler_config",
270 ]
222 extra_deps = [ 271 extra_deps = [
272 "vm:libdart_platform",
223 "vm:libdart_lib_with_precompiler", 273 "vm:libdart_lib_with_precompiler",
224 "vm:libdart_vm_with_precompiler", 274 "vm:libdart_vm_with_precompiler",
225 ] 275 ]
226 } 276 }
227 277
278 libdart_library("libdart_with_precompiler_product") {
279 extra_configs = [
280 ":dart_product_config",
281 ":dart_precompiler_config",
282 ]
283 extra_deps = [
284 "vm:libdart_platform_product",
285 "vm:libdart_lib_with_precompiler_product",
286 "vm:libdart_vm_with_precompiler_product",
287 ]
288 }
289
228 action("generate_version_cc_file") { 290 action("generate_version_cc_file") {
229 deps = [ 291 deps = [
230 "third_party/double-conversion/src:libdouble_conversion", 292 "third_party/double-conversion/src:libdouble_conversion",
231 "vm:libdart_lib_jit", 293 "vm:libdart_lib_jit",
232 "vm:libdart_lib_nosnapshot_with_precompiler", 294 "vm:libdart_lib_nosnapshot_with_precompiler",
233 "vm:libdart_vm_jit", 295 "vm:libdart_vm_jit",
234 "vm:libdart_vm_nosnapshot_with_precompiler", 296 "vm:libdart_vm_nosnapshot_with_precompiler",
235 ] 297 ]
236 inputs = [ 298 inputs = [
237 "../tools/utils.py", 299 "../tools/utils.py",
238 "../tools/print_version.py", 300 "../tools/print_version.py",
239 "../tools/VERSION", 301 "../tools/VERSION",
240 "vm/version_in.cc", 302 "vm/version_in.cc",
241 ] 303 ]
242 output = "$target_gen_dir/version.cc" 304 output = "$target_gen_dir/version.cc"
243 outputs = [ 305 outputs = [
244 output, 306 output,
245 ] 307 ]
246 308
247 script = "../tools/make_version.py" 309 script = "../tools/make_version.py"
248 args = [ 310 args = [
249 "--quiet", 311 "--quiet",
250 "--output", 312 "--output",
251 rebase_path(output, root_build_dir), 313 rebase_path(output, root_build_dir),
252 "--input", 314 "--input",
253 rebase_path("vm/version_in.cc", root_build_dir), 315 rebase_path("vm/version_in.cc", root_build_dir),
254 ] 316 ]
255 } 317 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698