• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@rules_license//rules:license.bzl", "license")
2load("//bazel:gen_compile_flags_txt_linux_amd64.bzl", "gen_compile_flags_txt_linux_amd64")
3
4package(
5    default_applicable_licenses = ["//:license"],
6)
7
8# https://opensource.google/documentation/reference/thirdparty/new_license_rules
9# https://github.com/bazelbuild/rules_license/blob/bcffeb0c481d178cbee69bdc7e23ef22d3a087b1/rules/license.bzl
10license(
11    name = "license",
12    license_kinds = ["@rules_license//licenses/generic:notice"],
13    license_text = "LICENSE",
14)
15
16licenses(["notice"])
17
18alias(
19    name = "core",
20    actual = "//src/core:core",
21    visibility = ["//visibility:public"],
22)
23
24alias(
25    name = "pathops",
26    actual = "//src/pathops:pathops",
27    visibility = ["//visibility:public"],
28)
29
30###
31
32alias(
33    name = "ganesh_gl",
34    actual = "//src/gpu/ganesh/gl:ganesh_gl",
35    visibility = ["//visibility:public"],
36)
37
38alias(
39    name = "ganesh_egl_factory",
40    actual = "//src/gpu/ganesh/gl/egl:egl_factory",
41    visibility = ["//visibility:public"],
42)
43
44alias(
45    name = "ganesh_gl_epoxy_factory",
46    actual = "//src/gpu/ganesh/gl/epoxy:epoxy_factory",
47    visibility = ["//visibility:public"],
48)
49
50alias(
51    name = "ganesh_glx_factory",
52    actual = "//src/gpu/ganesh/gl/glx:glx_factory",
53    visibility = ["//visibility:public"],
54)
55
56alias(
57    name = "ganesh_gl_ios_factory",
58    actual = "//src/gpu/ganesh/gl/ios:ios_factory",
59    visibility = ["//visibility:public"],
60)
61
62alias(
63    name = "ganesh_gl_mac_factory",
64    actual = "//src/gpu/ganesh/gl/mac:mac_factory",
65    visibility = ["//visibility:public"],
66)
67
68alias(
69    name = "ganesh_webgl_factory",
70    actual = "//src/gpu/ganesh/gl/webgl:webgl_factory",
71    visibility = ["//visibility:public"],
72)
73
74alias(
75    name = "ganesh_gl_win_factory",
76    actual = "//src/gpu/ganesh/gl/win:win_factory",
77    visibility = ["//visibility:public"],
78)
79
80alias(
81    name = "ganesh_metal",
82    actual = "//src/gpu/ganesh/mtl:ganesh_metal",
83    visibility = ["//visibility:public"],
84)
85
86alias(
87    name = "ganesh_vulkan",
88    actual = "//src/gpu/ganesh/vk:ganesh_vulkan",
89    visibility = ["//visibility:public"],
90)
91
92###
93
94alias(
95    name = "graphite_dawn_vulkan",
96    actual = "//src/gpu/graphite/vk:graphite_dawn_vulkan",
97    visibility = ["//visibility:public"],
98)
99
100alias(
101    name = "graphite_native_metal",
102    actual = "//src/gpu/graphite/mtl:graphite_native_metal",
103    visibility = ["//visibility:public"],
104)
105
106alias(
107    name = "graphite_native_vulkan",
108    actual = "//src/gpu/graphite/vk:graphite_native_vulkan",
109    visibility = ["//visibility:public"],
110)
111
112###
113
114alias(
115    name = "bmp_decode_codec",
116    actual = "//src/codec:bmp_decode",
117    visibility = ["//visibility:public"],
118)
119
120alias(
121    name = "gif_decode_codec",
122    actual = "//src/codec:gif_decode",
123    visibility = ["//visibility:public"],
124)
125
126alias(
127    name = "ico_decode_codec",
128    actual = "//src/codec:ico_decode",
129    visibility = ["//visibility:public"],
130)
131
132alias(
133    name = "jpeg_encode_codec",
134    actual = "//src/encode:jpeg_encode",
135    visibility = ["//visibility:public"],
136)
137
138alias(
139    name = "jpeg_decode_codec",
140    actual = "//src/codec:jpeg_decode",
141    visibility = ["//visibility:public"],
142)
143
144alias(
145    name = "jpegxl_decode_codec",
146    actual = "//src/codec:jpegxl_decode",
147    visibility = ["//visibility:public"],
148)
149
150alias(
151    name = "png_decode_codec",
152    actual = "//src/codec:png_decode",
153    visibility = ["//visibility:public"],
154)
155
156alias(
157    name = "png_encode_codec",
158    actual = "//src/encode:png_encode",
159    visibility = ["//visibility:public"],
160)
161
162alias(
163    name = "wbmp_decode_codec",
164    actual = "//src/codec:wbmp_decode",
165    visibility = ["//visibility:public"],
166)
167
168alias(
169    name = "webp_decode_codec",
170    actual = "//src/codec:webp_decode",
171    visibility = ["//visibility:public"],
172)
173
174alias(
175    name = "webp_encode_codec",
176    actual = "//src/encode:webp_encode",
177    visibility = ["//visibility:public"],
178)
179
180###
181
182alias(
183    name = "fontmgr_empty_freetype",
184    actual = "//src/ports:fontmgr_empty_freetype",
185    visibility = ["//visibility:public"],
186)
187
188alias(
189    name = "fontmgr_coretext",
190    actual = "//src/ports:fontmgr_coretext",
191    visibility = ["//visibility:public"],
192)
193
194alias(
195    name = "fontmgr_data_freetype",
196    actual = "//src/ports:fontmgr_data_freetype",
197    visibility = ["//visibility:public"],
198)
199
200alias(
201    name = "fontmgr_directory_freetype",
202    actual = "//src/ports:fontmgr_directory_freetype",
203    visibility = ["//visibility:public"],
204)
205
206alias(
207    name = "freetype_support",
208    actual = "//src/ports:freetype_support",
209    visibility = ["//visibility:public"],
210)
211
212alias(
213    name = "fontmgr_fontconfig_freetype",
214    actual = "//src/ports:fontmgr_fontconfig_freetype",
215    visibility = ["//visibility:public"],
216)
217
218alias(
219    name = "fontmgr_fontconfig_fontations",
220    actual = "//src/ports:fontmgr_fontconfig_fontations",
221    visibility = ["//visibility:public"],
222)
223
224alias(
225    name = "fontmgr_android_freetype",
226    actual = "//src/ports:fontmgr_android_freetype",
227    visibility = ["//visibility:public"],
228)
229
230alias(
231    name = "fontmgr_empty_fontations",
232    actual = "//src/ports:fontmgr_fontations_empty",
233    visibility = ["//visibility:public"],
234)
235
236###
237
238alias(
239    name = "pdf_writer",
240    actual = "//src/pdf:pdf",
241    visibility = ["//visibility:public"],
242)
243
244###
245
246alias(
247    name = "skottie",
248    actual = "//modules/skottie:skottie",
249    visibility = ["//visibility:public"],
250)
251
252###
253
254alias(
255    name = "skparagraph_harfbuzz_skunicode",
256    actual = "//modules/skparagraph:skparagraph_harfbuzz_skunicode",
257    visibility = ["//visibility:public"],
258)
259
260###
261
262alias(
263    name = "skshaper_core",
264    actual = "//modules/skshaper:skshaper_core_and_utils",
265    visibility = ["//visibility:public"],
266)
267
268alias(
269    name = "skshaper_coretext",
270    actual = "//modules/skshaper:skshaper_coretext",
271    visibility = ["//visibility:public"],
272)
273
274alias(
275    name = "skshaper_harfbuzz",
276    actual = "//modules/skshaper:skshaper_harfbuzz",
277    visibility = ["//visibility:public"],
278)
279
280alias(
281    name = "skshaper_unicode",
282    actual = "//modules/skshaper:skshaper_unicode",
283    visibility = ["//visibility:public"],
284)
285
286###
287
288alias(
289    name = "skresources",
290    actual = "//modules/skresources:skresources",
291    visibility = ["//visibility:public"],
292)
293
294###
295
296# Allows Skia to take an SVG in as an input
297alias(
298    name = "svg_renderer",
299    actual = "//modules/svg:svg_renderer",
300    visibility = ["//visibility:public"],
301)
302
303# Allows Skia to draw to an SVG
304alias(
305    name = "svg_writer",
306    actual = "//src/svg:svg",
307    visibility = ["//visibility:public"],
308)
309
310###
311
312alias(
313    name = "skunicode_core",
314    actual = "//modules/skunicode:skunicode_core",
315    visibility = ["//visibility:public"],
316)
317
318alias(
319    name = "skunicode_icu",
320    actual = "//modules/skunicode:skunicode_icu",
321    visibility = ["//visibility:public"],
322)
323
324# Load bearing comment below - gazelle looks here (and not in any other BUILD.bazel files)
325# for a special comment indicating the prefix.
326# gazelle:prefix go.skia.org/skia
327
328# This is an alias to avoid having to load the golang toolchain code just to
329# create the rules in our primary BUILD.bazel file
330alias(
331    name = "gazelle",
332    actual = "//infra:gazelle",
333    visibility = ["//visibility:public"],
334)
335
336test_suite(
337    name = "all_go_tests",
338    tests = [
339        # Go tests in this list will be tested in CI. Please add any new Go tests to this suite.
340        "//bazel/device_specific_configs:device_specific_configs_test",
341        "//bazel/exporter:exporter_test",
342        "//infra/bots/task_drivers/bazel_test_benchmark:bazel_test_benchmark_test",
343        "//infra/bots/task_drivers/bazel_test_gm:bazel_test_gm_test",
344        "//infra/bots/task_drivers/bazel_test_precompiled:bazel_test_precompiled_test",
345        "//infra/bots/task_drivers/codesize:codesize_test",
346        "//infra/bots/task_drivers/common:common_test",
347        "//infra/bots/task_drivers/perf_puppeteer_canvas:perf_puppeteer_canvas_test",
348        "//infra/bots/task_drivers/perf_puppeteer_render_skps:perf_puppeteer_render_skps_test",
349        "//infra/bots/task_drivers/perf_puppeteer_skottie_frames:perf_puppeteer_skottie_frames_test",
350        "//tools/testrunners/common/android/adb_test_runner:adb_test_runner_test",
351    ],
352)
353
354# Generates a compile_flags.txt file for use with clangd against the Bazel-downloaded Linux AMD64
355# clang hermetic toolchain.
356#
357# This command prints to standard output a compile_flags.txt file that can be used with clangd to
358# enable autocompletion on editors that support it. See:
359# https://clangd.llvm.org/design/compile-commands.
360#
361# Note that this is implemented on a best effort basis. The produced compile_flags.txt file will
362# contain the subset of flags used by most targets, but some targets might require additional
363# flags. If that's the case, please manually add them to your compile_flags.txt file.
364#
365# Sample usage:
366#
367#     $ bazel run //:gen_compile_flags_txt_linux_amd64 > compile_flags.txt
368#
369# Invoke with --config=<some config> to generate flags with the defines and includes required for
370# your build. For example, if you build your binary as follows:
371#
372#     $ bazel build //path/to:binary --config=gl_ganesh
373#
374# Then your compile_flags.txt file should be generated with:
375#
376#     $ bazel run //:gen_compile_flags_txt_linux_amd64 --config=gl_ganesh > compile_flags.txt
377#
378# This was tested with Visual Studio Code and the clangd extension:
379# https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd.
380gen_compile_flags_txt_linux_amd64(
381    name = "gen_compile_flags_txt_linux_amd64",
382)
383
384######
385# go #
386######
387
388# Sample usage: "bazel run //:go -- generate ./...".
389alias(
390    name = "go",
391    actual = "@go_sdk//:bin/go",
392    visibility = ["//visibility:public"],
393)
394
395#########
396# gofmt #
397#########
398
399# Sample usage: "bazel run //:gofmt -- -s -w .".
400alias(
401    name = "gofmt",
402    actual = "@go_sdk//:bin/gofmt",
403    visibility = ["//visibility:public"],
404)
405
406############
407# Errcheck #
408############
409
410# Sample usage: "bazel run //:errcheck -- go.skia.org/skia/...".
411alias(
412    name = "errcheck",
413    actual = "//infra:errcheck",
414    visibility = ["//visibility:public"],
415)
416
417##############
418# buildifier #
419##############
420
421# Sample usage: "bazel run //:buildifier".
422alias(
423    name = "buildifier",
424    actual = "//bazel:buildifier",
425)
426