[fuchsia] Changes to compilation and packaging
On Fuchsia we need to compile ICU at 3 separate but
not always different ICU commit IDs.
For this to be possible, the following changes are
needed in the ICU library proper:
- We introduced a file `//build/icu.gni` which
will live in the Fuchsia git tree, and contains
the shared configuration to be used instead of
`config.gni`. Without it, compilation will fail
saying that multiple config files define the
same args.
- Added some flags and conditionals to avoid
putting key artifacts into `$root_build_dir`.
Without it, compilation will fail because
all ICU flavors we compile will want to put
same-named artifacts into the same spot in
`$root_build_dir`.
- Started storing the major version of the
library in a JSON file at the root directory.
This allows tools other than GN to read the
file, and use standardized tools for parsing
the value. Without this, we'd need to rely on
possibly brittle parsing to achieve the same
effect, which seemed unnecessary.
I modified scripts/update.sh to transition to
updating the JSON file, so the update process
does not change for the human operator.
These settings should only take effect in the
Fuchsia in-tree build of ICU. While there might
be some value in having `//build/icu.gni` defined
in each downstream build, this seemed like an
overkill at this time.
Before this change is merged, I will also need to
merge the file `//build/icu.gni` to Fuchsia's
git repository.
README.fuchsia has the details.
Tested: manually with Fuchsia's build.
Bug: fuchsia:117972
Change-Id: Ib2be3b5fe22823e4784d8a72f8b8a35e28328d8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/4179136
Reviewed-by: Frank Tang <ftang@chromium.org>
6 files changed