OLD | NEW |
1 ################################################################################ | 1 ################################################################################ |
2 # Skylark macros | 2 # Skylark macros |
3 ################################################################################ | 3 ################################################################################ |
4 | 4 |
5 is_bazel = not hasattr(native, "genmpm") | 5 is_bazel = not hasattr(native, "genmpm") |
6 | 6 |
7 def portable_select(select_dict, bazel_condition, default_condition): | 7 def portable_select(select_dict, bazel_condition, default_condition): |
8 """Replaces select() with a Bazel-friendly wrapper. | 8 """Replaces select() with a Bazel-friendly wrapper. |
9 | 9 |
10 Args: | 10 Args: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 if hasattr(srcs, 'exclude'): | 48 if hasattr(srcs, 'exclude'): |
49 return native.glob(srcs.include, exclude=srcs.exclude) | 49 return native.glob(srcs.include, exclude=srcs.exclude) |
50 else: | 50 else: |
51 return native.glob(srcs.include) | 51 return native.glob(srcs.include) |
52 return [] | 52 return [] |
53 | 53 |
54 ################################################################################ | 54 ################################################################################ |
55 ## PRIVATE_HDRS | 55 ## PRIVATE_HDRS |
56 ################################################################################ | 56 ################################################################################ |
57 | 57 |
58 PRIVATE_HDRS_LIST = [ | 58 PRIVATE_HDRS_INCLUDE_LIST = [ |
59 "include/private/**/*", | 59 "include/private/**/*.h", |
60 "src/utils/SkWhitelistChecksums.inc", | 60 "src/**/*.inc", |
61 ] | 61 ] |
62 | 62 |
63 PRIVATE_HDRS = struct( | 63 PRIVATE_HDRS = struct( |
64 include = PRIVATE_HDRS_LIST, | 64 include = PRIVATE_HDRS_INCLUDE_LIST, |
| 65 ) |
| 66 |
| 67 ALL_HDRS = struct( |
| 68 include = [ |
| 69 "src/**/*.h", |
| 70 "include/**/*.h", |
| 71 ], |
65 ) | 72 ) |
66 | 73 |
67 ################################################################################ | 74 ################################################################################ |
68 ## BASE_SRCS | 75 ## BASE_SRCS |
69 ################################################################################ | 76 ################################################################################ |
70 | 77 |
71 # All platform-independent SRCS. | 78 # All platform-independent SRCS. |
72 BASE_SRCS_ALL = struct( | 79 BASE_SRCS_ALL = struct( |
73 include = [ | 80 include = [ |
74 "src/**/*.h", | 81 "src/**/*.h", |
75 "src/**/*.cpp", | 82 "src/**/*.cpp", |
76 | 83 |
77 # Third Party | 84 # Third Party |
78 "third_party/etc1/*.cpp", | 85 "third_party/etc1/*.cpp", |
79 "third_party/etc1/*.h", | 86 "third_party/etc1/*.h", |
80 "third_party/ktx/*.cpp", | 87 "third_party/ktx/*.cpp", |
81 "third_party/ktx/*.h", | 88 "third_party/ktx/*.h", |
82 ], | 89 ], |
83 exclude = PRIVATE_HDRS_LIST + [ | 90 # Note: PRIVATE_HDRS_INCLUDE_LIST is excluded from BASE_SRCS_ALL here |
| 91 # because they are required to appear in srcs for some rules but hdrs for |
| 92 # other rules. See internal cl/119566959. |
| 93 exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
84 # Exclude platform-dependent files. | 94 # Exclude platform-dependent files. |
85 "src/android/*", | 95 "src/android/*", |
86 "src/codec/*", | 96 "src/codec/*", |
87 "src/device/xps/*", # Windows-only. Move to ports? | 97 "src/device/xps/*", # Windows-only. Move to ports? |
88 "src/doc/*_XPS.cpp", # Windows-only. Move to ports? | 98 "src/doc/*_XPS.cpp", # Windows-only. Move to ports? |
89 "src/fonts/SkFontMgr_fontconfig.cpp", | 99 "src/fonts/SkFontMgr_fontconfig.cpp", |
90 "src/gpu/gl/android/*", | 100 "src/gpu/gl/android/*", |
91 "src/gpu/gl/egl/*", | 101 "src/gpu/gl/egl/*", |
92 "src/gpu/gl/glfw/*", | 102 "src/gpu/gl/glfw/*", |
93 "src/gpu/gl/glx/*", | 103 "src/gpu/gl/glx/*", |
(...skipping 20 matching lines...) Expand all Loading... |
114 | 124 |
115 # Exclude files that don't compile with the current DEFINES. | 125 # Exclude files that don't compile with the current DEFINES. |
116 "src/gpu/gl/mesa/*", # Requires SK_MESA define. | 126 "src/gpu/gl/mesa/*", # Requires SK_MESA define. |
117 "src/svg/**/*", # Depends on XML. | 127 "src/svg/**/*", # Depends on XML. |
118 "src/xml/**/*", | 128 "src/xml/**/*", |
119 | 129 |
120 # Conflicting dependencies among Lua versions. See cl/107087297. | 130 # Conflicting dependencies among Lua versions. See cl/107087297. |
121 "src/utils/SkLua*", | 131 "src/utils/SkLua*", |
122 | 132 |
123 # Not used. | 133 # Not used. |
124 "src/animator/**/*", | |
125 "src/views/**/*", | 134 "src/views/**/*", |
126 | 135 |
127 # Currently exclude all vulkan specific files | 136 # Currently exclude all vulkan specific files |
128 "src/gpu/vk/*", | 137 "src/gpu/vk/*", |
129 "src/sksl/**/*", | 138 "src/sksl/**/*", |
130 ], | 139 ], |
131 ) | 140 ) |
132 | 141 |
133 # Platform-dependent SRCS for google3-default platform. | 142 # Platform-dependent SRCS for google3-default platform. |
134 BASE_SRCS_UNIX = struct( | 143 BASE_SRCS_UNIX = struct( |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 ) | 322 ) |
314 | 323 |
315 ################################################################################ | 324 ################################################################################ |
316 ## BASE_HDRS | 325 ## BASE_HDRS |
317 ################################################################################ | 326 ################################################################################ |
318 | 327 |
319 BASE_HDRS = struct( | 328 BASE_HDRS = struct( |
320 include = [ | 329 include = [ |
321 "include/**/*.h", | 330 "include/**/*.h", |
322 ], | 331 ], |
323 exclude = PRIVATE_HDRS_LIST + [ | 332 exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
324 # Not used. | 333 # Not used. |
325 "include/animator/**/*", | 334 "include/animator/**/*", |
326 "include/views/**/*", | 335 "include/views/**/*", |
327 ], | 336 ], |
328 ) | 337 ) |
329 | 338 |
330 ################################################################################ | 339 ################################################################################ |
331 ## BASE_DEPS | 340 ## BASE_DEPS |
332 ################################################################################ | 341 ################################################################################ |
333 | 342 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 397 |
389 DM_SRCS_ALL = struct( | 398 DM_SRCS_ALL = struct( |
390 include = [ | 399 include = [ |
391 "dm/*.cpp", | 400 "dm/*.cpp", |
392 "dm/*.h", | 401 "dm/*.h", |
393 "gm/*.c", | 402 "gm/*.c", |
394 "gm/*.cpp", | 403 "gm/*.cpp", |
395 "gm/*.h", | 404 "gm/*.h", |
396 "tests/*.cpp", | 405 "tests/*.cpp", |
397 "tests/*.h", | 406 "tests/*.h", |
| 407 "tools/BigPathBench.inc", |
398 "tools/CrashHandler.cpp", | 408 "tools/CrashHandler.cpp", |
399 "tools/CrashHandler.h", | 409 "tools/CrashHandler.h", |
400 "tools/ProcStats.cpp", | 410 "tools/ProcStats.cpp", |
401 "tools/ProcStats.h", | 411 "tools/ProcStats.h", |
402 "tools/Resources.cpp", | 412 "tools/Resources.cpp", |
403 "tools/Resources.h", | 413 "tools/Resources.h", |
| 414 "tools/SkJSONCPP.h", |
| 415 "tools/UrlDataManager.cpp", |
| 416 "tools/UrlDataManager.h", |
| 417 "tools/debugger/*.cpp", |
| 418 "tools/debugger/*.h", |
404 "tools/flags/*.cpp", | 419 "tools/flags/*.cpp", |
405 "tools/flags/*.h", | 420 "tools/flags/*.h", |
406 "tools/gpu/**/*.cpp", | 421 "tools/gpu/**/*.cpp", |
407 "tools/gpu/**/*.h", | 422 "tools/gpu/**/*.h", |
408 "tools/picture_utils.cpp", | 423 "tools/picture_utils.cpp", |
| 424 "tools/picture_utils.h", |
409 "tools/random_parse_path.cpp", | 425 "tools/random_parse_path.cpp", |
410 "tools/random_parse_path.h", | 426 "tools/random_parse_path.h", |
411 "tools/sk_tool_utils.cpp", | 427 "tools/sk_tool_utils.cpp", |
412 "tools/sk_tool_utils.h", | 428 "tools/sk_tool_utils.h", |
| 429 "tools/sk_tool_utils_flags.h", |
413 "tools/sk_tool_utils_font.cpp", | 430 "tools/sk_tool_utils_font.cpp", |
| 431 "tools/test_font_monospace.inc", |
| 432 "tools/test_font_sans_serif.inc", |
| 433 "tools/test_font_serif.inc", |
| 434 "tools/test_font_index.inc", |
414 "tools/timer/*.cpp", | 435 "tools/timer/*.cpp", |
415 "tools/timer/*.h", | 436 "tools/timer/*.h", |
416 ], | 437 ], |
417 exclude = [ | 438 exclude = [ |
418 "dm/DMSrcSinkAndroid.cpp", # Android-only. | 439 "dm/DMSrcSinkAndroid.cpp", # Android-only. |
419 "tests/FontMgrAndroidParserTest.cpp", # Android-only. | 440 "tests/FontMgrAndroidParserTest.cpp", # Android-only. |
420 "tests/PathOpsSkpClipTest.cpp", # Alternate main. | 441 "tests/PathOpsSkpClipTest.cpp", # Alternate main. |
421 "tests/skia_test.cpp", # Old main. | 442 "tests/skia_test.cpp", # Old main. |
422 "tests/SkpSkGrTest.cpp", # Alternate main. | 443 "tests/SkpSkGrTest.cpp", # Alternate main. |
423 "tests/SkSLErrorTest.cpp", # Excluded along with Vulkan. | 444 "tests/SkSLErrorTest.cpp", # Excluded along with Vulkan. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 DM_INCLUDES = [ | 485 DM_INCLUDES = [ |
465 "dm", | 486 "dm", |
466 "gm", | 487 "gm", |
467 "src/codec", | 488 "src/codec", |
468 "src/effects", | 489 "src/effects", |
469 "src/effects/gradients", | 490 "src/effects/gradients", |
470 "src/fonts", | 491 "src/fonts", |
471 "src/pathops", | 492 "src/pathops", |
472 "src/pipe/utils", | 493 "src/pipe/utils", |
473 "src/ports", | 494 "src/ports", |
474 "tools/debugger", | |
475 "tests", | 495 "tests", |
476 "tools", | 496 "tools", |
| 497 "tools/debugger", |
477 "tools/flags", | 498 "tools/flags", |
478 "tools/gpu", | 499 "tools/gpu", |
479 "tools/timer", | 500 "tools/timer", |
480 ] | 501 ] |
481 | 502 |
482 ################################################################################ | 503 ################################################################################ |
483 ## DM_ARGS | 504 ## DM_ARGS |
484 ################################################################################ | 505 ################################################################################ |
485 | 506 |
486 def DM_ARGS(base_dir, asan): | 507 def DM_ARGS(base_dir, asan): |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 | 633 |
613 LINKOPTS_ANDROID = [ | 634 LINKOPTS_ANDROID = [ |
614 "-lEGL", | 635 "-lEGL", |
615 ] | 636 ] |
616 | 637 |
617 LINKOPTS_IOS = [] | 638 LINKOPTS_IOS = [] |
618 | 639 |
619 LINKOPTS_ALL = [ | 640 LINKOPTS_ALL = [ |
620 "-ldl", | 641 "-ldl", |
621 ] | 642 ] |
OLD | NEW |