e6cfe77185
Change DEPS to point at upstream, not chromium's fork. `skia_use_icu` defaults to true everywhere but iOS Clean up SkLoadICU: use U_ICUDATA_ENTRY_POINT, no DLL. Add data dep to icu/icu.gni Scripts: icu/{make_data_assembly.py,make_data_obj_win.py} Scripts: icu/{update_icu.sh,build_icu_data_file.py} for rebuilding document process in icu/README.md Bug: skia:8702 Change-Id: I99789749ba84ae737f6c62475d0d676cd36715bb Reviewed-on: https://skia-review.googlesource.com/c/186870 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> |
||
---|---|---|
.. | ||
build_icu_data_file.py | ||
BUILD.gn | ||
download_file.py | ||
hasher.py | ||
icu.gni | ||
make_data_assembly.py | ||
make_data_obj_win.py | ||
README.md | ||
SkLoadICU.h | ||
update_icu.sh |
ICU
If the GN variable use_icu
is set and skia_use_system_icu
is unset, then
the build system will build ICU from the source. The repository in
../externals/icu
is a mirror of the Unicode Consortium's repository.
ICU requires a platform-independent data file, which it does not provide in its repository. The data file can be built by first building the ICU tools to process the provided source data, but this is a giant hassle for building ICU in a cross-platform way (which might necessitate building ICU twice).
icu/BUILD.gn has two action build rules: get_data
and assemble_data
.
get_data
downloads the icu.dat
file if it is not already downloaded. The
Google Cloud Storage location of the file is content-addressed with the
icu_dat_md5
GN variable found in icu.gni
.
assemble_data
will produce either a C++ source file (for our WASM build), an
object file (for our Windows builds), or a assembly file (for everything else).
These files will contain a single exported symbol, icudtNN_dat
which points
at a block of data containing the contents of the icu.dat
file.
This build also provides the SkLoadICU
function, which must be called on
Windows for some reason.
How To Update ICU Dependency
When we update the ICU branch, we will use the update_icu.sh
script to
update the icu.gni
file and produce a new .dat
file for upload.
-
Edit
DEPS
file. -
Run update script:
third_party/icu/update_icu.sh
-
Upload new data file.
DATA_FILE
andGS_URL
will be provided by the output of the previous step.gsutil cp DATA_FILE GS_URL
-
Commit:
git add DEPS third_party/icu/icu.gni git commit -m 'DEPS: update ICU' git push origin @:refs/for/master bin/sysopen https://review.skia.org/$(bin/gerrit-number @)