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

Side by Side Diff: Source/platform/BUILD.gn

Issue 332123002: GN: Enable blink platform heap targets, put all tests behind flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//build/config/ui.gni") 5 import("//build/config/ui.gni")
6 import("//third_party/WebKit/Source/build/scripts/scripts.gni") 6 import("//third_party/WebKit/Source/build/scripts/scripts.gni")
7 import("//third_party/WebKit/Source/config.gni") 7 import("//third_party/WebKit/Source/config.gni")
8 import("//third_party/WebKit/Source/platform/platform_generated.gni") 8 import("//third_party/WebKit/Source/platform/platform_generated.gni")
9 9
10 # TODO(GYP) Remove when heap targets work 10 # TODO(GYP) Remove when test targets link (depends on ffmpeg)
11 enable_blink_platform_heap_targets = false 11 enable_blink_platform_test_targets = false
12 12
13 13
14 if (enable_blink_platform_heap_targets) {
15 import("//third_party/yasm/yasm_assemble.gni") 14 import("//third_party/yasm/yasm_assemble.gni")
16 }
17 15
18 platform_gypi = exec_script( 16 platform_gypi = exec_script(
19 "//build/gypi_to_gn.py", 17 "//build/gypi_to_gn.py",
20 [ rebase_path("blink_platform.gypi") ], 18 [ rebase_path("blink_platform.gypi") ],
21 "scope", 19 "scope",
22 [ "blink_platform.gypi" ]) 20 [ "blink_platform.gypi" ])
23 21 if (enable_blink_platform_test_targets) {
24 if (enable_blink_platform_heap_targets) {
25 heap_gypi = exec_script( 22 heap_gypi = exec_script(
26 "//build/gypi_to_gn.py", 23 "//build/gypi_to_gn.py",
27 [ rebase_path("heap/blink_heap.gypi") ], 24 [ rebase_path("heap/blink_heap.gypi") ],
28 "scope", 25 "scope",
29 [ "heap/blink_heap.gypi" ]) 26 [ "heap/blink_heap.gypi" ])
30 } 27 }
31 28
32 blink_platform_neon_files = [ 29 blink_platform_neon_files = [
33 "graphics/cpu/arm/WebGLImageConversionNEON.h", 30 "graphics/cpu/arm/WebGLImageConversionNEON.h",
34 "graphics/cpu/arm/filters/FEBlendNEON.h", 31 "graphics/cpu/arm/filters/FEBlendNEON.h",
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 "BLINK_PLATFORM_IMPLEMENTATION=1", 189 "BLINK_PLATFORM_IMPLEMENTATION=1",
193 "INSIDE_BLINK", 190 "INSIDE_BLINK",
194 ] 191 ]
195 192
196 include_dirs = [ 193 include_dirs = [
197 #"$angle_path/include", 194 #"$angle_path/include",
198 "$root_gen_dir/blink", 195 "$root_gen_dir/blink",
199 ] 196 ]
200 197
201 deps = [ 198 deps = [
199 ":heap_asm_stubs",
202 ":make_platform_generated", 200 ":make_platform_generated",
203 "//gpu/command_buffer/client:gles2_c_lib", 201 "//gpu/command_buffer/client:gles2_c_lib",
204 "//skia", 202 "//skia",
205 "//third_party:jpeg", 203 "//third_party:jpeg",
206 "//third_party/harfbuzz-ng", 204 "//third_party/harfbuzz-ng",
207 "//third_party/iccjpeg", 205 "//third_party/iccjpeg",
208 "//third_party/icu", 206 "//third_party/icu",
209 "//third_party/libpng", 207 "//third_party/libpng",
210 "//third_party/libwebp", 208 "//third_party/libwebp",
211 "//third_party/ots", 209 "//third_party/ots",
212 "//third_party/qcms", 210 "//third_party/qcms",
213 "//third_party/WebKit/Source/wtf", 211 "//third_party/WebKit/Source/wtf",
214 "//third_party/WebKit/Source/platform/heap", 212 "//third_party/WebKit/Source/platform/heap",
215 "//url", 213 "//url",
216 "//v8", 214 "//v8",
217 ] 215 ]
218 216
219 if (enable_blink_platform_heap_targets) {
220 deps += [ ":heap_asm_stubs" ]
221 }
222
223 forward_dependent_configs_from = [ 217 forward_dependent_configs_from = [
224 "//gpu/command_buffer/client:gles2_c_lib", 218 "//gpu/command_buffer/client:gles2_c_lib",
225 "//skia", 219 "//skia",
226 "//third_party:jpeg", 220 "//third_party:jpeg",
227 "//third_party/iccjpeg", 221 "//third_party/iccjpeg",
228 "//third_party/libpng", 222 "//third_party/libpng",
229 "//third_party/libwebp", 223 "//third_party/libwebp",
230 "//third_party/ots", 224 "//third_party/ots",
231 "//third_party/qcms", 225 "//third_party/qcms",
232 "//url", 226 "//url",
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 #deps += [ "//third_party/ffmpeg" ] 335 #deps += [ "//third_party/ffmpeg" ]
342 } 336 }
343 if (use_openmax_dl_fft) { 337 if (use_openmax_dl_fft) {
344 include_dirs += [ "//third_party/openmax_dl" ] 338 include_dirs += [ "//third_party/openmax_dl" ]
345 # TODO(GYP) 339 # TODO(GYP)
346 # deps += [ "//third_party/openmax_dl/dl" ] 340 # deps += [ "//third_party/openmax_dl/dl" ]
347 } 341 }
348 } 342 }
349 343
350 344
351 if (enable_blink_platform_heap_targets) {
352
353 yasm_assemble("heap_asm_stubs") { 345 yasm_assemble("heap_asm_stubs") {
354 if (cpu_arch == "x86" || cpu_arch == "x64") { 346 if (cpu_arch == "x86" || cpu_arch == "x64") {
355 sources = [ "heap/asm/SaveRegisters_x86.asm" ] 347 sources = [ "heap/asm/SaveRegisters_x86.asm" ]
356 } else if (cpu_arch == "arm") { 348 } else if (cpu_arch == "arm") {
357 sources = [ "heap/asm/SaveRegisters_arm.S" ] 349 sources = [ "heap/asm/SaveRegisters_arm.S" ]
358 } else if (cpu_arch == "arm64") { 350 } else if (cpu_arch == "arm64") {
359 sources = [ "heap/asm/SaveRegisters_arm64.S" ] 351 sources = [ "heap/asm/SaveRegisters_arm64.S" ]
360 } else if (cpu_arch == "mipsel") { 352 } else if (cpu_arch == "mipsel") {
361 sources = [ "heap/asm/SaveRegisters_mips.S" ] 353 sources = [ "heap/asm/SaveRegisters_mips.S" ]
362 } 354 }
(...skipping 10 matching lines...) Expand all
373 } else { 365 } else {
374 yasm_flags += [ "-DX64POSIX=1" ] 366 yasm_flags += [ "-DX64POSIX=1" ]
375 } 367 }
376 } else if (cpu_arch == "x86") { 368 } else if (cpu_arch == "x86") {
377 yasm_flags += [ "-DIA32=1" ] 369 yasm_flags += [ "-DIA32=1" ]
378 } else if (cpu_arch == "arm") { 370 } else if (cpu_arch == "arm") {
379 yasm_flags += [ "-DARM=1" ] 371 yasm_flags += [ "-DARM=1" ]
380 } 372 }
381 } 373 }
382 374
383 }
384
385 source_set("heap_run_all_tests") { 375 source_set("heap_run_all_tests") {
386 sources = [ 376 sources = [
387 "heap/RunAllTests.cpp" 377 "heap/RunAllTests.cpp"
388 ] 378 ]
389 379
390 configs += [ 380 configs += [
391 "//third_party/WebKit/Source/wtf:wtf_config", 381 "//third_party/WebKit/Source/wtf:wtf_config",
392 "//third_party/WebKit/Source:config", 382 "//third_party/WebKit/Source:config",
393 "//third_party/WebKit/Source:non_test_config", 383 "//third_party/WebKit/Source:non_test_config",
394 ] 384 ]
395 385
396 deps = [ 386 deps = [
397 "//base/test:test_support", 387 "//base/test:test_support",
398 "//testing/gmock", 388 "//testing/gmock",
399 "//testing/gtest", 389 "//testing/gtest",
400 "//third_party/WebKit/Source/wtf", 390 "//third_party/WebKit/Source/wtf",
401 ] 391 ]
402 } 392 }
403 393
404 if (enable_blink_platform_heap_targets) { 394 if (enable_blink_platform_test_targets) {
405 395
406 test("heap_unittests") { 396 test("heap_unittests") {
407 output_name = "blink_heap_unittests" 397 output_name = "blink_heap_unittests"
408 398
409 sources = rebase_path(heap_gypi.platform_heap_test_files, ".", "heap") 399 sources = rebase_path(heap_gypi.platform_heap_test_files, ".", "heap")
410 400
411 configs += [ 401 configs += [
412 "//third_party/WebKit/Source:config", 402 "//third_party/WebKit/Source:config",
413 ] 403 ]
414 404
(...skipping 23 matching lines...) Expand all
438 ] 428 ]
439 429
440 deps = [ 430 deps = [
441 "//base/test:test_support", 431 "//base/test:test_support",
442 "//testing/gmock", 432 "//testing/gmock",
443 "//testing/gtest", 433 "//testing/gtest",
444 "//third_party/WebKit/Source/wtf", 434 "//third_party/WebKit/Source/wtf",
445 ] 435 ]
446 } 436 }
447 437
448 # TODO(GYP) enable this target when it links (blocked on WebP symbols). 438 if (enable_blink_platform_test_targets) {
449 if (false) {
450 439
451 test("platform_unittests") { 440 test("platform_unittests") {
452 output_name = "blink_platform_unittests" 441 output_name = "blink_platform_unittests"
453 442
454 sources = platform_gypi.platform_test_files 443 sources = platform_gypi.platform_test_files
455 444
456 configs += [ 445 configs += [
457 "//third_party/WebKit/Source:config", 446 "//third_party/WebKit/Source:config",
458 ] 447 ]
459 448
460 deps = [ 449 deps = [
461 ":blink_common", 450 ":blink_common",
462 ":heap_run_all_tests", 451 ":platform_run_all_tests",
463 ":platform", 452 ":platform",
464 "//base", 453 "//base",
465 "//base/allocator", 454 "//base/allocator",
466 "//skia", 455 "//skia",
467 "//testing/gmock", 456 "//testing/gmock",
468 "//testing/gtest", 457 "//testing/gtest",
469 "//third_party/WebKit/Source/wtf", 458 "//third_party/WebKit/Source/wtf",
470 "//third_party/WebKit/Source/wtf:unittest_helpers", 459 "//third_party/WebKit/Source/wtf:unittest_helpers",
471 "//url", 460 "//url",
472 ] 461 ]
473 462
474 defines = [ 463 defines = [
475 "INSIDE_BLINK", 464 "INSIDE_BLINK",
476 ] 465 ]
477 466
478 include_dirs = [ 467 include_dirs = [
479 "$root_gen_dir/blink/platform", 468 "$root_gen_dir/blink",
480 ] 469 ]
481 } 470 }
482 471
483 } # TODO(GYP) 472 }
484 473
485 474
486 if (cpu_arch == "arm") { 475 if (cpu_arch == "arm") {
487 source_set("blink_arm_neon") { 476 source_set("blink_arm_neon") {
488 sources = blink_platform_neon_files 477 sources = blink_platform_neon_files
489 478
490 # The *NEON.cpp files fail to compile when -mthumb is passed. Force 479 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
491 # them to build in ARM mode. 480 # them to build in ARM mode.
492 # See https://bugs.webkit.org/show_bug.cgi?id=62916. 481 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
493 # TODO(GYP) 482 # TODO(GYP)
494 #'cflags': ['-marm'], 483 #'cflags': ['-marm'],
495 # 'conditions': [ 484 # 'conditions': [
496 # ['OS=="android"', { 485 # ['OS=="android"', {
497 # 'cflags!': ['-mthumb'], 486 # 'cflags!': ['-mthumb'],
498 # }], 487 # }],
499 # ], 488 # ],
500 489
501 deps = [ ":blink_common" ] 490 deps = [ ":blink_common" ]
502 } 491 }
503 } 492 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698