| load("//:defines.bzl", "DEFAULT_DEFINES", "DEFAULT_LOCAL_DEFINES") |
| load("@skia_user_config//:copts.bzl", "DEFAULT_OBJC_COPTS") |
| load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library", "skia_objc_library") |
| |
| licenses(["notice"]) |
| |
| exports_files_legacy() |
| |
| # All the mm files from the Skia library are rolled up to this objc library since cc_library |
| # ignores mm files. This private library is then deps'ed into the public and internal versions |
| # of the SKia library below. The Skia library Objective-C code requires ARC, while non-library code |
| # does not. |
| skia_objc_library( |
| name = "skia_objc", |
| srcs = [ |
| "//src:objc_srcs", |
| ], |
| copts = DEFAULT_OBJC_COPTS + ["-fobjc-arc"], |
| defines = DEFAULT_DEFINES, |
| deps = [ |
| "//src:deps", |
| "@skia_user_config//:user_config", |
| ], |
| ) |
| |
| # This target exposes the Skia public API. It is what external clients should use. |
| skia_cc_library( |
| name = "skia_public", |
| srcs = [ |
| "//include:private_hdrs", |
| "//include:srcs", |
| "//src:private_hdrs", |
| "//src:srcs", |
| ], |
| hdrs = ["//include:public_hdrs"], |
| defines = DEFAULT_DEFINES, |
| local_defines = DEFAULT_LOCAL_DEFINES, |
| visibility = ["//visibility:public"], |
| deps = [ |
| "//src:deps", |
| "@skia_user_config//:user_config", |
| ] + select({ |
| "//src/gpu:metal_ganesh": ["//:skia_objc"], |
| "//conditions:default": [], |
| }), |
| ) |
| |
| # This target exposes headers beyond the public, supported API. It is intended to be |
| # used by Skia's tests and tooling. |
| skia_cc_library( |
| name = "skia_internal", |
| srcs = [ |
| "//include:srcs", |
| "//src:srcs", |
| ], |
| hdrs = [ |
| "//include:private_hdrs", |
| "//include:public_hdrs", |
| "//src:private_hdrs", |
| ], |
| defines = DEFAULT_DEFINES, |
| local_defines = DEFAULT_LOCAL_DEFINES, |
| visibility = [ |
| "//dm:__subpackages__", |
| "//gm:__subpackages__", |
| "//modules:__subpackages__", |
| "//tests:__subpackages__", |
| "//tools:__subpackages__", |
| ], |
| deps = [ |
| "//src:deps", |
| "@skia_user_config//:user_config", |
| ] + select({ |
| "//src/gpu:metal_ganesh": ["//:skia_objc"], |
| "//conditions:default": [], |
| }), |
| ) |
| |
| #################################################################### |
| # Experimental public buffet targets below |
| |
| alias( |
| name = "core", |
| actual = "//src/core:core", |
| visibility = ["//visibility:public"], |
| ) |
| |
| alias( |
| name = "pathops", |
| actual = "//src/pathops:pathops", |
| visibility = ["//visibility:public"], |
| ) |
| |
| alias( |
| name = "default_malloc", |
| actual = "//src/ports:default_malloc", |
| visibility = ["//visibility:public"], |
| ) |
| |
| # Load bearing comment below - gazelle looks here (and not in any other BUILD.bazel files) |
| # for a special comment indicating the prefix. |
| # gazelle:prefix go.skia.org/skia |
| |
| # This is an alias to avoid having to load the golang toolchain code just to |
| # create the rules in our primary BUILD.bazel file |
| alias( |
| name = "gazelle", |
| actual = "//infra:gazelle", |
| visibility = ["//visibility:public"], |
| ) |
| |
| test_suite( |
| name = "all_go_tests", |
| tests = [ |
| # Go tests in this list will be tested in CI. Please add any new Go tests to this suite. |
| "//bazel/exporter:exporter_test", |
| "//infra/bots/task_drivers/bazel_test_gm:bazel_test_gm_test", |
| "//infra/bots/task_drivers/bazel_test_precompiled:bazel_test_precompiled_test", |
| "//infra/bots/task_drivers/codesize:codesize_test", |
| "//infra/bots/task_drivers/common:common_test", |
| "//infra/bots/task_drivers/perf_puppeteer_canvas:perf_puppeteer_canvas_test", |
| "//infra/bots/task_drivers/perf_puppeteer_render_skps:perf_puppeteer_render_skps_test", |
| "//infra/bots/task_drivers/perf_puppeteer_skottie_frames:perf_puppeteer_skottie_frames_test", |
| ], |
| ) |