skia2/third_party/icu/BUILD.gn
Florin Malita 0c2add016d Revert "third_party/icu: use upstream"
This reverts commit e6cfe77185.

Reason for revert: Android & Win7 perf/test failures.


Original change's description:
> third_party/icu:  use upstream
> 
>     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>

TBR=halcanary@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com

Change-Id: Id379bc2be7d53eca67b2c557ac20bd44073a6258
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8702
Reviewed-on: https://skia-review.googlesource.com/c/189647
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-06 02:28:30 +00:00

96 lines
2.2 KiB
Plaintext

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
skia_use_system_icu = is_official_build
}
import("../../gn/skia.gni")
import("../third_party.gni")
import("icu.gni")
if (skia_use_icu) {
if (skia_use_system_icu) {
system("icu") {
libs = [ "icuuc" ]
defines = [ "U_USING_ICU_NAMESPACE=0" ]
}
} else {
data_assembly = "$target_gen_dir/icudtl_dat.S"
data_dir = "../externals/icu/"
if (is_android) {
data_dir += "android"
} else if (is_ios) {
data_dir += "ios"
} else {
data_dir += "common"
}
action("make_data_assembly") {
script = "../externals/icu/scripts/make_data_assembly.py"
inputs = [
"$data_dir/icudtl.dat",
]
outputs = [
"$data_assembly",
]
args = [
rebase_path(inputs[0], root_build_dir),
rebase_path(data_assembly, root_build_dir),
]
if (is_mac || is_ios) {
args += [ "--mac" ]
}
}
third_party("icu") {
public_include_dirs = [
"../externals/icu/source/common",
"../externals/icu/source/i18n",
".",
]
public_defines = [
"U_USING_ICU_NAMESPACE=0",
"SK_USING_THIRD_PARTY_ICU",
]
configs -= [ "//gn:no_rtti" ]
defines = [
# http://userguide.icu-project.org/howtouseicu
"U_COMMON_IMPLEMENTATION",
"U_STATIC_IMPLEMENTATION",
"U_ENABLE_DYLOAD=0",
"U_I18N_IMPLEMENTATION",
]
sources = icu_sources
if (is_win) {
deps = [
":icudata",
]
public_defines += [
"U_NOEXCEPT=",
"U_STATIC_IMPLEMENTATION",
]
libs = [ "Advapi32.lib" ]
sources += [ "../externals/icu/source/stubdata/stubdata.cpp" ]
} else {
sources += [ "$data_assembly" ]
deps = [
":make_data_assembly",
]
}
}
if (is_win) {
copy("icudata") {
sources = [
"../externals/icu/windows/icudt.dll",
]
outputs = [
"$root_out_dir/icudt.dll",
]
data = outputs
}
}
}
}