Newer
Older
configs += [ ":icu_code" ]
public_configs = [ ":icu_config" ]
if (is_win || icu_use_data_file) {
defines += [ "U_ICUDATAENTRY_IN_COMMON" ]
}
if (is_fuchsia) {
# Fuchsia puts its own libicuuc.so in /system/lib where we need to put our
# .so when doing component builds, so we need to give this a different name.
output_name = "icuuc_cr"
}
if (is_android && enable_java_templates) {
android_assets("icu_assets") {
if (icu_use_data_file) {
sources = [ "$root_out_dir/icudtl.dat" ]
deps = [ ":icudata" ]
disable_compression = true
}
}
}
# TODO(GYP): Gyp has considerations here for QNX and for the host toolchain
# that have not been ported over.
if (is_android) {
} else if (is_ios) {
data_dir = "ios"
Michael Achenbach
committed
if (current_cpu == "mips" || current_cpu == "mips64" ||
host_byteorder == "big") {
data_bundle_prefix = "icudtb"
} else {
data_bundle_prefix = "icudtl"
}
data_bundle = "${data_bundle_prefix}.dat"
# TODO(GYP) support use_system_icu.
if (icu_use_data_file) {
if (is_ios) {
bundle_data("icudata") {
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
Dirk Pranke
committed
}
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "$root_out_dir/$data_bundle" ]
data = [ "$root_out_dir/$data_bundle" ]
}
}
} else {
if (is_win) {
# On Windows the target DLL is pre-built so just use a copy rule.
# data_bundle and data_dir have to be used to avoid 'unused variable'
# error.
data_bundle = "icudt.dll"
data_dir = "windows"
sources = [ "$data_dir/$data_bundle" ]
outputs = [ "$root_out_dir/$data_bundle" ]
data = outputs
data_assembly = "$target_gen_dir/${data_bundle_prefix}_dat.S"
action("make_data_assembly") {
script = "scripts/make_data_assembly.py"
inputs = [ "$data_dir/$data_bundle" ]
outputs = [ "$data_assembly" ]
args = [
rebase_path(inputs[0], root_build_dir),
rebase_path(data_assembly, root_build_dir),
]
# TODO(GYP): Gyp has considerations here for QNX and for the host
# toolchain that have not been ported over.
if (is_mac || is_ios) {
}
source_set("icudata") {
sources = [ "$data_assembly" ]