• 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
244alias(
245    name = "pdf_jpeg_helpers",
246    actual = "//src/pdf:jpeg_helpers",
247    visibility = ["//visibility:public"],
248)
249
250###
251
252alias(
253    name = "skottie",
254    actual = "//modules/skottie:skottie",
255    visibility = ["//visibility:public"],
256)
257
258###
259
260alias(
261    name = "skparagraph_harfbuzz_skunicode",
262    actual = "//modules/skparagraph:skparagraph_harfbuzz_skunicode",
263    visibility = ["//visibility:public"],
264)
265
266###
267
268alias(
269    name = "skshaper_core",
270    actual = "//modules/skshaper:skshaper_core_and_utils",
271    visibility = ["//visibility:public"],
272)
273
274alias(
275    name = "skshaper_coretext",
276    actual = "//modules/skshaper:skshaper_coretext",
277    visibility = ["//visibility:public"],
278)
279
280alias(
281    name = "skshaper_harfbuzz",
282    actual = "//modules/skshaper:skshaper_harfbuzz",
283    visibility = ["//visibility:public"],
284)
285
286alias(
287    name = "skshaper_unicode",
288    actual = "//modules/skshaper:skshaper_unicode",
289    visibility = ["//visibility:public"],
290)
291
292###
293
294alias(
295    name = "skresources",
296    actual = "//modules/skresources:skresources",
297    visibility = ["//visibility:public"],
298)
299
300###
301
302# Allows Skia to take an SVG in as an input
303alias(
304    name = "svg_renderer",
305    actual = "//modules/svg:svg_renderer",
306    visibility = ["//visibility:public"],
307)
308
309# Allows Skia to draw to an SVG
310alias(
311    name = "svg_writer",
312    actual = "//src/svg:svg",
313    visibility = ["//visibility:public"],
314)
315
316###
317
318alias(
319    name = "skunicode_core",
320    actual = "//modules/skunicode:skunicode_core",
321    visibility = ["//visibility:public"],
322)
323
324alias(
325    name = "skunicode_icu",
326    actual = "//modules/skunicode:skunicode_icu",
327    visibility = ["//visibility:public"],
328)
329
330# Load bearing comment below - gazelle looks here (and not in any other BUILD.bazel files)
331# for a special comment indicating the prefix.
332# gazelle:prefix go.skia.org/skia
333
334# This is an alias to avoid having to load the golang toolchain code just to
335# create the rules in our primary BUILD.bazel file
336alias(
337    name = "gazelle",
338    actual = "//infra:gazelle",
339    visibility = ["//visibility:public"],
340)
341
342test_suite(
343    name = "all_go_tests",
344    tests = [
345        # Go tests in this list will be tested in CI. Please add any new Go tests to this suite.
346        "//bazel/device_specific_configs:device_specific_configs_test",
347        "//bazel/exporter:exporter_test",
348        "//infra/bots/task_drivers/bazel_test_benchmark:bazel_test_benchmark_test",
349        "//infra/bots/task_drivers/bazel_test_gm:bazel_test_gm_test",
350        "//infra/bots/task_drivers/bazel_test_precompiled:bazel_test_precompiled_test",
351        "//infra/bots/task_drivers/codesize:codesize_test",
352        "//infra/bots/task_drivers/common:common_test",
353        "//infra/bots/task_drivers/perf_puppeteer_canvas:perf_puppeteer_canvas_test",
354        "//infra/bots/task_drivers/perf_puppeteer_render_skps:perf_puppeteer_render_skps_test",
355        "//infra/bots/task_drivers/perf_puppeteer_skottie_frames:perf_puppeteer_skottie_frames_test",
356        "//tools/testrunners/common/android/adb_test_runner:adb_test_runner_test",
357    ],
358)
359
360# Generates a compile_flags.txt file for use with clangd against the Bazel-downloaded Linux AMD64
361# clang hermetic toolchain.
362#
363# This command prints to standard output a compile_flags.txt file that can be used with clangd to
364# enable autocompletion on editors that support it. See:
365# https://clangd.llvm.org/design/compile-commands.
366#
367# Note that this is implemented on a best effort basis. The produced compile_flags.txt file will
368# contain the subset of flags used by most targets, but some targets might require additional
369# flags. If that's the case, please manually add them to your compile_flags.txt file.
370#
371# Sample usage:
372#
373#     $ bazel run //:gen_compile_flags_txt_linux_amd64 > compile_flags.txt
374#
375# Invoke with --config=<some config> to generate flags with the defines and includes required for
376# your build. For example, if you build your binary as follows:
377#
378#     $ bazel build //path/to:binary --config=gl_ganesh
379#
380# Then your compile_flags.txt file should be generated with:
381#
382#     $ bazel run //:gen_compile_flags_txt_linux_amd64 --config=gl_ganesh > compile_flags.txt
383#
384# This was tested with Visual Studio Code and the clangd extension:
385# https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd.
386gen_compile_flags_txt_linux_amd64(
387    name = "gen_compile_flags_txt_linux_amd64",
388)
389
390######
391# go #
392######
393
394# Sample usage: "bazel run //:go -- generate ./...".
395alias(
396    name = "go",
397    actual = "@go_sdk//:bin/go",
398    visibility = ["//visibility:public"],
399)
400
401#########
402# gofmt #
403#########
404
405# Sample usage: "bazel run //:gofmt -- -s -w .".
406alias(
407    name = "gofmt",
408    actual = "@go_sdk//:bin/gofmt",
409    visibility = ["//visibility:public"],
410)
411
412############
413# Errcheck #
414############
415
416# Sample usage: "bazel run //:errcheck -- go.skia.org/skia/...".
417alias(
418    name = "errcheck",
419    actual = "//infra:errcheck",
420    visibility = ["//visibility:public"],
421)
422
423##############
424# buildifier #
425##############
426
427# Sample usage: "bazel run //:buildifier".
428alias(
429    name = "buildifier",
430    actual = "//bazel:buildifier",
431)
432