4bd08c52c0
As a follow-up to https://skia-review.googlesource.com/c/skia/+/476219, this sketches out how we can maybe use cc_library for the things in //modules to make sure something in //src doesn't depend on anything in //modules, for example. The following succeeds: bazel build //modules/skparagraph:skparagraph --config=clang \ --shaper_backend=harfbuzz_shaper --with_icu As does `make bazel_canvaskit_debug` in //modules/canvaskit Suggested Review Order: - third_party/BUILD.bazel for ICU and harfbuzz rules. Pay special attention to the genrules used to call the python script for turning the icu .dat file into .S or .cpp. - bazelrc and bazel/ for new flags and defines that control use of ICU and harfbuzz. Unlike GN, with the public_defines that get added in automatically if icu or harfbuzz is depended upon, we need to set the defines at the top level. This necessity might go away if we change the atoms to depend on //modules/skshaper, which could define that flag. - Top level BUILD.bazel files in //modules/skparagraph, //modules/skshaper, //modules/skunicode, //modules/canvaskit - All other .bazel file changes are automatic. Bug: skia:12541 Change-Id: I38a9e0a9261d7e142eeb271c2ddb23f362f91473 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478116 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Leandro Lovisolo <lovisolo@google.com> |
||
---|---|---|
.. | ||
BUILD.gn | ||
config-override.h | ||
LICENSE | ||
README | ||
roll-harfbuzz.sh |
#!/bin/sh # Some of HarfBuzz's headers are created at build time using the Ragel # State Machine Compiler. To reduce complex dependencies, I pre-built # these files: # hb-buffer-deserialize-json.hh # hb-buffer-deserialize-text.hh # hb-ot-shape-complex-indic-machine.hh # hb-ot-shape-complex-myanmar-machine.hh # hb-ot-shape-complex-use-machine.hh # from these sources: # ../externals/harfbuzz/src/hb-buffer-deserialize-json.rl # ../externals/harfbuzz/src/hb-buffer-deserialize-text.rl # ../externals/harfbuzz/src/hb-ot-shape-complex-indic-machine.rl # ../externals/harfbuzz/src/hb-ot-shape-complex-myanmar-machine.rl # ../externals/harfbuzz/src/hb-ot-shape-complex-use-machine.rl # # The files in this directory are created by installing the # prerequiste packages, checking out a new version of HarfBuzz, doing # `./autogen.sh && ./configure && make`, then copying the # autogenerated .h and .hh files to this directory. # # These files are now checked into the git repository and the HarfBuzz # maintainers keep them up to date by using the build rules in the HarfBuzz # build. As a result this step is no longer necessary, but if we need to # regenerate these files ourselves, this is how to do it. set -e set -x for package in automake libtool pkg-config ragel gtk-doc-tools; do if ! ( dpkg-query -W -f'${Status}' "$package" 2>/dev/null | \ grep -q "ok installed" ); then sudo apt-get install "$package" fi done cd "$(dirname "$0")/../externals/harfbuzz" ./autogen.sh ./configure make -j4 cp src/hb-version.h ../../harfbuzz/ for RAGEL_FILE in src/*.rl; do BUILT_HEADER="src/$(basename "$RAGEL_FILE" '.rl').hh" if [ -f "$BUILT_HEADER" ]; then cp -v "$BUILT_HEADER" ../../harfbuzz/ fi done git clean -fxd