skia2/third_party
Kevin Lubick 1f8c31b101 [infra] Add initial Bazel rules and files
These rules can be used to build our GMs on WASM+WebGL and
libskia.a with just the CPU backend (and most other features
turned off).

This can be done with the following commands:
  - bazel build //modules/canvaskit:gm-bindings-wasm --gpu_backend=gl_backend --with_gl_standard=webgl_standard
  - bazel build :skia-core --config clang

This pivots slightly from http://review.skia.org/463517
by using config_settings [1] instead of platforms for
the optional features that we control. This pivot was
suggested in [2]

We have BUILD.bazel files in many of the subdirectories
that specify filegroups for the appropriate files. In
an effort to make //BUILD.bazel more readable, it is
the responsibility of these subfolders to deal with
conditionally including certain .h or .cpp files.
This is done using select statements and config_settings
or platform constraints as necessary.

For example, src/gpu/BUILD.bazel will different private
filegroups for each of the supported gpu backends [3]
and a more-visible filegroup called "srcs" that has
the right selection of the private files to be used
for compilation.

An effort has been made to avoid using glob() in our
BUILD.bazel files. These file lists were made by using
`ls -1` and some regex to add in quotes. We might want
to make a helper script to assist with that, if necessary.

To specify which options we have, the settings in
//bazel/common_config_settings/BUILD.bazel have been
redesigned. They make use of a macro `string_flag_with_values`
that removes the boilerplate. Patchset 36 shows what the
file looks like w/o the macro.

The top level BUILD.bazel file will still need to use
some logic to handle defines, because local_defines is
a list of strings, not a list of labels [4].

Suggested Review Order:
  - WORKSPACE.bazel to see the new dependencies on the
    emsdk toolchain and bazel_skylib
  - bazel/common_config_settings/* to see the few settings
    defined (we have more to define, see BUILD.gn and
    //gn/skia.gni for ideas)
  - BUILD.bazel to see the "skia-core" cc_library rule.
    See also "gms" and "tests"
  - modules/canvaskit/BUILD.bazel to see the use of
    the emscripten "wasm_cc_binary" rule, which depends
    on the "skia-core", "gms", and "tests" rule. Note that
    it only builds some of the gms as a proof of concept.
  - The other BUILD.bazel files. Some of these are not
    platform or feature dependent (e.g. pathops). Others
    are (e.g. gpu).
  - All other files.

[1] https://docs.bazel.build/versions/4.2.1/skylark/config.html#user-defined-build-settings
[2] https://github.com/emscripten-core/emsdk/pull/920
[3] In this CL, that's just the webgl one.
[4] https://docs.bazel.build/versions/main/be/c-cpp.html#cc_library.local_defines

Change-Id: Ieecf9c106d5e3a6ae97d13d66be06b4b3c207089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/458637
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
2021-11-09 12:32:25 +00:00
..
angle2 Port to ANGLE's GN files 2020-09-11 15:22:34 +00:00
brotli [canvaskit] Add support for woff2 fonts 2020-11-10 15:07:26 +00:00
cpu-features reformat GN files 2020-04-01 23:23:03 +00:00
d3d12allocator Add AMD allocator to D3D12 backend. 2020-09-23 21:22:52 +00:00
dng_sdk Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
etc1 Update etc1.cpp. 2020-12-16 17:57:26 +00:00
expat Add LICENSE file to third_party/expat/include/expat_config/ 2021-05-27 18:15:18 +00:00
freetype2 Roll FreeType from 61903609 to 12ef831f (10 commits) 2021-09-29 14:28:39 +00:00
harfbuzz Roll FreeType from 61903609 to 12ef831f (10 commits) 2021-09-29 14:28:39 +00:00
icu Reland "Experimental ICU runtime linking" 2021-07-27 19:51:31 +00:00
imgui Enable OS X clipboard in ImGui. 2020-07-01 21:33:07 +00:00
libjpeg-turbo Update version of libjpeg-turbo used by Skia's test infra 2021-05-04 21:49:45 +00:00
libmicrohttpd
libpng reformat GN files 2020-04-01 23:23:03 +00:00
libwebp update libwebp to v1.2.1 2021-08-16 13:57:40 +00:00
lua
musl_compat Add LICENSE to third_party/musl_compat 2021-10-21 13:49:16 +00:00
native_app_glue reformat GN files 2020-04-01 23:23:03 +00:00
oboe Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
piex
sfntly reformat GN files 2020-04-01 23:23:03 +00:00
skcms Roll skcms from b5aafce0db45 to 0d5496480324 (1 revision) 2021-10-06 21:51:25 +00:00
spirv-cross Roll Dawn and add dependencies 2020-03-30 18:52:06 +00:00
vulkanmemoryallocator Update AMD vulkan memory allocator. 2020-05-13 13:03:39 +00:00
wuffs Inclusive language 2020-07-24 13:33:53 +00:00
zlib Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
BUILD.bazel [infra] Add initial Bazel rules and files 2021-11-09 12:32:25 +00:00
BUILD.gn
README
third_party.gni Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00

The third_party directory contains a set of dependencies from outside sources
that are needed to build various components and tools within Skia.  

Some of these dependencies reside within the Skia repo, while others are pulled 
from other repositories and placed in the third_party/externals directory
during build. These external dependencies are defined in a DEPS file.

Products in third_party are subject to their own respective license terms.  The
license for each project should be included in the source itself via a license
header or file.  If the source itself does not include a license header or file,
create a README that refers to reliable documentation of the project's license
terms on the web.