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

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

Issue 329993006: Implement main blink target in GN. (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
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 visibility = "//third_party/WebKit/*"
11
10 # TODO(GYP) Remove when test targets link (depends on ffmpeg) 12 # TODO(GYP) Remove when test targets link (depends on ffmpeg)
11 enable_blink_platform_test_targets = false 13 enable_blink_platform_test_targets = false
12 14
13 15
14 import("//third_party/yasm/yasm_assemble.gni") 16 import("//third_party/yasm/yasm_assemble.gni")
15 17
16 platform_gypi = exec_script( 18 platform_gypi = exec_script(
17 "//build/gypi_to_gn.py", 19 "//build/gypi_to_gn.py",
18 [ rebase_path("blink_platform.gypi") ], 20 [ rebase_path("blink_platform.gypi") ],
19 "scope", 21 "scope",
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 "WebCoreFlippedView=ChromiumWebCoreObjCWebCoreFlippedView", 89 "WebCoreFlippedView=ChromiumWebCoreObjCWebCoreFlippedView",
88 "WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell", 90 "WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell",
89 "WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderTh emeNotificationObserver", 91 "WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderTh emeNotificationObserver",
90 ] 92 ]
91 } 93 }
92 } 94 }
93 95
94 # FontFamilyNames action in make_platform_generated in 96 # FontFamilyNames action in make_platform_generated in
95 # platform_generated.gyp 97 # platform_generated.gyp
96 action("font_family_names") { 98 action("font_family_names") {
99 visibility = ":*"
jamesr 2014/06/19 18:01:14 in core/BUILD.gn you went the other way - restrict
brettw 2014/06/19 18:22:54 Done.
97 script = "../build/scripts/make_names.py" 100 script = "../build/scripts/make_names.py"
98 101
99 font_family_names_in = "fonts/FontFamilyNames.in" 102 font_family_names_in = "fonts/FontFamilyNames.in"
100 source_prereqs = make_names_files + [ font_family_names_in ] 103 source_prereqs = make_names_files + [ font_family_names_in ]
101 104
102 outputs = [ 105 outputs = [
103 "$blink_platform_output_dir/FontFamilyNames.cpp", 106 "$blink_platform_output_dir/FontFamilyNames.cpp",
104 "$blink_platform_output_dir/FontFamilyNames.h", 107 "$blink_platform_output_dir/FontFamilyNames.h",
105 ] 108 ]
106 109
107 args = [ 110 args = [
108 rebase_path(font_family_names_in, root_build_dir), 111 rebase_path(font_family_names_in, root_build_dir),
109 "--output_dir", 112 "--output_dir",
110 rebase_path(blink_platform_output_dir, root_build_dir), 113 rebase_path(blink_platform_output_dir, root_build_dir),
111 ] 114 ]
112 } 115 }
113 116
114 # RuntimeEnabledFeatures action in make_platform_generated in 117 # RuntimeEnabledFeatures action in make_platform_generated in
115 # platform_generated.gyp 118 # platform_generated.gyp
116 action("runtime_enabled_features") { 119 action("runtime_enabled_features") {
120 visibility = ":*"
117 script = "../build/scripts/make_runtime_features.py" 121 script = "../build/scripts/make_runtime_features.py"
118 122
119 runtime_enabled_features_in = "RuntimeEnabledFeatures.in" 123 runtime_enabled_features_in = "RuntimeEnabledFeatures.in"
120 source_prereqs = scripts_for_in_files + [ 124 source_prereqs = scripts_for_in_files + [
121 runtime_enabled_features_in, 125 runtime_enabled_features_in,
122 "../build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl", 126 "../build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl",
123 "../build/scripts/templates/RuntimeEnabledFeatures.h.tmpl", 127 "../build/scripts/templates/RuntimeEnabledFeatures.h.tmpl",
124 ] 128 ]
125 129
126 outputs = [ 130 outputs = [
127 "$blink_platform_output_dir/RuntimeEnabledFeatures.cpp", 131 "$blink_platform_output_dir/RuntimeEnabledFeatures.cpp",
128 "$blink_platform_output_dir/RuntimeEnabledFeatures.h", 132 "$blink_platform_output_dir/RuntimeEnabledFeatures.h",
129 ] 133 ]
130 134
131 args = [ 135 args = [
132 rebase_path(runtime_enabled_features_in, root_build_dir), 136 rebase_path(runtime_enabled_features_in, root_build_dir),
133 "--output_dir", 137 "--output_dir",
134 rebase_path(blink_platform_output_dir, root_build_dir), 138 rebase_path(blink_platform_output_dir, root_build_dir),
135 ] 139 ]
136 } 140 }
137 141
138 # ColorData action in make_platform_generated in platform_generated.gyp 142 # ColorData action in make_platform_generated in platform_generated.gyp
139 action("color_data") { 143 action("color_data") {
144 visibility = ":*"
140 script = "../build/scripts/gperf.py" 145 script = "../build/scripts/gperf.py"
141 146
142 color_data_gperf = "ColorData.gperf" 147 color_data_gperf = "ColorData.gperf"
143 source_prereqs = [ color_data_gperf ] 148 source_prereqs = [ color_data_gperf ]
144 149
145 output_file = "$blink_platform_output_dir/ColorData.cpp" 150 output_file = "$blink_platform_output_dir/ColorData.cpp"
146 outputs = [ output_file ] 151 outputs = [ output_file ]
147 152
148 args = [ 153 args = [
149 gperf_exe, 154 gperf_exe,
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 340 }
336 if (use_openmax_dl_fft) { 341 if (use_openmax_dl_fft) {
337 include_dirs += [ "//third_party/openmax_dl" ] 342 include_dirs += [ "//third_party/openmax_dl" ]
338 # TODO(GYP) 343 # TODO(GYP)
339 # deps += [ "//third_party/openmax_dl/dl" ] 344 # deps += [ "//third_party/openmax_dl/dl" ]
340 } 345 }
341 } 346 }
342 347
343 348
344 yasm_assemble("heap_asm_stubs") { 349 yasm_assemble("heap_asm_stubs") {
350 visibility = ":*"
345 if (cpu_arch == "x86" || cpu_arch == "x64") { 351 if (cpu_arch == "x86" || cpu_arch == "x64") {
346 sources = [ "heap/asm/SaveRegisters_x86.asm" ] 352 sources = [ "heap/asm/SaveRegisters_x86.asm" ]
347 } else if (cpu_arch == "arm") { 353 } else if (cpu_arch == "arm") {
348 sources = [ "heap/asm/SaveRegisters_arm.S" ] 354 sources = [ "heap/asm/SaveRegisters_arm.S" ]
349 } else if (cpu_arch == "arm64") { 355 } else if (cpu_arch == "arm64") {
350 sources = [ "heap/asm/SaveRegisters_arm64.S" ] 356 sources = [ "heap/asm/SaveRegisters_arm64.S" ]
351 } else if (cpu_arch == "mipsel") { 357 } else if (cpu_arch == "mipsel") {
352 sources = [ "heap/asm/SaveRegisters_mips.S" ] 358 sources = [ "heap/asm/SaveRegisters_mips.S" ]
353 } 359 }
354 360
(...skipping 10 matching lines...) Expand all
365 yasm_flags += [ "-DX64POSIX=1" ] 371 yasm_flags += [ "-DX64POSIX=1" ]
366 } 372 }
367 } else if (cpu_arch == "x86") { 373 } else if (cpu_arch == "x86") {
368 yasm_flags += [ "-DIA32=1" ] 374 yasm_flags += [ "-DIA32=1" ]
369 } else if (cpu_arch == "arm") { 375 } else if (cpu_arch == "arm") {
370 yasm_flags += [ "-DARM=1" ] 376 yasm_flags += [ "-DARM=1" ]
371 } 377 }
372 } 378 }
373 379
374 source_set("heap_run_all_tests") { 380 source_set("heap_run_all_tests") {
381 visibility = ":*"
375 sources = [ 382 sources = [
376 "heap/RunAllTests.cpp" 383 "heap/RunAllTests.cpp"
377 ] 384 ]
378 385
379 configs += [ 386 configs += [
380 "//third_party/WebKit/Source/wtf:wtf_config", 387 "//third_party/WebKit/Source/wtf:wtf_config",
381 "//third_party/WebKit/Source:config", 388 "//third_party/WebKit/Source:config",
382 "//third_party/WebKit/Source:non_test_config", 389 "//third_party/WebKit/Source:non_test_config",
383 ] 390 ]
384 391
385 deps = [ 392 deps = [
386 "//base/test:test_support", 393 "//base/test:test_support",
387 "//testing/gmock", 394 "//testing/gmock",
388 "//testing/gtest", 395 "//testing/gtest",
389 "//third_party/WebKit/Source/wtf", 396 "//third_party/WebKit/Source/wtf",
390 ] 397 ]
391 } 398 }
392 399
393 if (enable_blink_platform_test_targets) { 400 if (enable_blink_platform_test_targets) {
394 401
395 test("heap_unittests") { 402 test("heap_unittests") {
403 visibility = ":*"
396 output_name = "blink_heap_unittests" 404 output_name = "blink_heap_unittests"
397 405
398 sources = rebase_path(heap_gypi.platform_heap_test_files, ".", "heap") 406 sources = rebase_path(heap_gypi.platform_heap_test_files, ".", "heap")
399 407
400 configs += [ 408 configs += [
401 "//third_party/WebKit/Source:config", 409 "//third_party/WebKit/Source:config",
402 ] 410 ]
403 411
404 deps = [ 412 deps = [
405 ":heap_run_all_tests", 413 ":heap_run_all_tests",
406 ":platform", 414 ":platform",
407 "//base", 415 "//base",
408 "//base/allocator", 416 "//base/allocator",
409 "//testing/gmock", 417 "//testing/gmock",
410 "//testing/gtest", 418 "//testing/gtest",
411 "//third_party/WebKit/Source/wtf", 419 "//third_party/WebKit/Source/wtf",
412 "//third_party/WebKit/Source/wtf:unittest_helpers", 420 "//third_party/WebKit/Source/wtf:unittest_helpers",
413 ] 421 ]
414 } 422 }
415 423
416 } 424 }
417 425
418 source_set("platform_run_all_tests") { 426 source_set("platform_run_all_tests") {
427 visibility = ":*"
419 sources = [ 428 sources = [
420 "testing/RunAllTests.cpp" 429 "testing/RunAllTests.cpp"
421 ] 430 ]
422 431
423 configs += [ 432 configs += [
424 "//third_party/WebKit/Source/wtf:wtf_config", 433 "//third_party/WebKit/Source/wtf:wtf_config",
425 "//third_party/WebKit/Source:config", 434 "//third_party/WebKit/Source:config",
426 "//third_party/WebKit/Source:non_test_config", 435 "//third_party/WebKit/Source:non_test_config",
427 ] 436 ]
428 437
429 deps = [ 438 deps = [
430 "//base/test:test_support", 439 "//base/test:test_support",
431 "//testing/gmock", 440 "//testing/gmock",
432 "//testing/gtest", 441 "//testing/gtest",
433 "//third_party/WebKit/Source/wtf", 442 "//third_party/WebKit/Source/wtf",
434 ] 443 ]
435 } 444 }
436 445
437 if (enable_blink_platform_test_targets) { 446 if (enable_blink_platform_test_targets) {
438 447
439 test("platform_unittests") { 448 test("platform_unittests") {
449 visibility = ":*"
440 output_name = "blink_platform_unittests" 450 output_name = "blink_platform_unittests"
441 451
442 sources = platform_gypi.platform_test_files 452 sources = platform_gypi.platform_test_files
443 453
444 configs += [ 454 configs += [
445 "//third_party/WebKit/Source:config", 455 "//third_party/WebKit/Source:config",
446 ] 456 ]
447 457
448 deps = [ 458 deps = [
449 ":blink_common", 459 ":blink_common",
(...skipping 16 matching lines...) Expand all
466 include_dirs = [ 476 include_dirs = [
467 "$root_gen_dir/blink", 477 "$root_gen_dir/blink",
468 ] 478 ]
469 } 479 }
470 480
471 } 481 }
472 482
473 483
474 if (cpu_arch == "arm") { 484 if (cpu_arch == "arm") {
475 source_set("blink_arm_neon") { 485 source_set("blink_arm_neon") {
486 visibility = ":*"
476 sources = blink_platform_neon_files 487 sources = blink_platform_neon_files
477 488
478 # The *NEON.cpp files fail to compile when -mthumb is passed. Force 489 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
479 # them to build in ARM mode. 490 # them to build in ARM mode.
480 # See https://bugs.webkit.org/show_bug.cgi?id=62916. 491 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
481 # TODO(GYP) 492 # TODO(GYP)
482 #'cflags': ['-marm'], 493 #'cflags': ['-marm'],
483 # 'conditions': [ 494 # 'conditions': [
484 # ['OS=="android"', { 495 # ['OS=="android"', {
485 # 'cflags!': ['-mthumb'], 496 # 'cflags!': ['-mthumb'],
486 # }], 497 # }],
487 # ], 498 # ],
488 499
489 deps = [ ":blink_common" ] 500 deps = [ ":blink_common" ]
490 } 501 }
491 } 502 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698