skia2/third_party/icu/BUILD.gn

244 lines
11 KiB
Plaintext
Raw Normal View History

# 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() {
Strengthen is_official_build, update docs. This makes is_official_build turn off all development targets and features in Skia, including building third-party dependencies from source. This will intentionally break some external users, who will find themselves no longer able to find third-party headers or link against third-party libraries. These users have been building with our testing third-party dependencies unknowingly. They'll need to either explicitly turn back on building each dependency from source (skia_use_system_foo=false) or disable that dependency entirely (skia_use_foo=false). is_skia_standalone is now basically !is_official_build, so I've propagated that through, removing is_skia_standalone. In a few places we were using it as a stand-in for defined(ndk), so I've just written defined(ndk) there. Duh. gn_to_bp: is_offical_build's new strength also makes gn_to_bp.py simpler to write. In spirit, Android builds are official Skia builds that also build DM and nanobench. It seems that SkJumper (src/jumper/*) is (unintentionally) enabled on Android. Switching to an is_official_build would have disabled that. But as that accidental launch seems to have gone fine, I've kept it explicitly enabled. In the end, no changes to Android.bp or its SkUserConfig.h. The -Mini builder no longer needs to explicitly disable tools. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73 Reviewed-on: https://skia-review.googlesource.com/9190 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 14:21:30 +00:00
skia_use_system_icu = is_official_build
}
import("../third_party.gni")
if (skia_use_system_icu) {
system("icu") {
libs = [ "icuuc" ]
defines = [ "U_USING_ICU_NAMESPACE=0" ]
}
} else {
third_party("icu") {
public_include_dirs = [
"../externals/icu/source/common",
".",
]
public_defines = [ "U_USING_ICU_NAMESPACE=0" ]
configs -= [ "//gn:no_rtti" ]
defines = [
# http://userguide.icu-project.org/howtouseicu
"U_COMMON_IMPLEMENTATION",
"U_STATIC_IMPLEMENTATION",
"U_ENABLE_DYLOAD=0",
]
sources = [
"../externals/icu/source/common/appendable.cpp",
"../externals/icu/source/common/bmpset.cpp",
"../externals/icu/source/common/brkeng.cpp",
"../externals/icu/source/common/brkiter.cpp",
"../externals/icu/source/common/bytestream.cpp",
"../externals/icu/source/common/bytestrie.cpp",
"../externals/icu/source/common/bytestriebuilder.cpp",
"../externals/icu/source/common/bytestrieiterator.cpp",
"../externals/icu/source/common/caniter.cpp",
"../externals/icu/source/common/chariter.cpp",
"../externals/icu/source/common/charstr.cpp",
"../externals/icu/source/common/cmemory.c",
"../externals/icu/source/common/cstring.c",
"../externals/icu/source/common/cwchar.c",
"../externals/icu/source/common/dictbe.cpp",
"../externals/icu/source/common/dictionarydata.cpp",
"../externals/icu/source/common/dtintrv.cpp",
"../externals/icu/source/common/errorcode.cpp",
"../externals/icu/source/common/filteredbrk.cpp",
"../externals/icu/source/common/filterednormalizer2.cpp",
"../externals/icu/source/common/icudataver.c",
"../externals/icu/source/common/icuplug.cpp",
"../externals/icu/source/common/listformatter.cpp",
"../externals/icu/source/common/loadednormalizer2impl.cpp",
"../externals/icu/source/common/locavailable.cpp",
"../externals/icu/source/common/locbased.cpp",
"../externals/icu/source/common/locdispnames.cpp",
"../externals/icu/source/common/locid.cpp",
"../externals/icu/source/common/loclikely.cpp",
"../externals/icu/source/common/locmap.c",
"../externals/icu/source/common/locresdata.cpp",
"../externals/icu/source/common/locutil.cpp",
"../externals/icu/source/common/messagepattern.cpp",
"../externals/icu/source/common/normalizer2.cpp",
"../externals/icu/source/common/normalizer2impl.cpp",
"../externals/icu/source/common/normlzr.cpp",
"../externals/icu/source/common/parsepos.cpp",
"../externals/icu/source/common/patternprops.cpp",
"../externals/icu/source/common/pluralmap.cpp",
"../externals/icu/source/common/propname.cpp",
"../externals/icu/source/common/propsvec.c",
"../externals/icu/source/common/punycode.cpp",
"../externals/icu/source/common/putil.cpp",
"../externals/icu/source/common/rbbi.cpp",
"../externals/icu/source/common/rbbidata.cpp",
"../externals/icu/source/common/rbbinode.cpp",
"../externals/icu/source/common/rbbirb.cpp",
"../externals/icu/source/common/rbbiscan.cpp",
"../externals/icu/source/common/rbbisetb.cpp",
"../externals/icu/source/common/rbbistbl.cpp",
"../externals/icu/source/common/rbbitblb.cpp",
"../externals/icu/source/common/resbund.cpp",
"../externals/icu/source/common/resbund_cnv.cpp",
"../externals/icu/source/common/resource.cpp",
"../externals/icu/source/common/ruleiter.cpp",
"../externals/icu/source/common/schriter.cpp",
"../externals/icu/source/common/serv.cpp",
"../externals/icu/source/common/servlk.cpp",
"../externals/icu/source/common/servlkf.cpp",
"../externals/icu/source/common/servls.cpp",
"../externals/icu/source/common/servnotf.cpp",
"../externals/icu/source/common/servrbf.cpp",
"../externals/icu/source/common/servslkf.cpp",
"../externals/icu/source/common/sharedobject.cpp",
"../externals/icu/source/common/simplepatternformatter.cpp",
"../externals/icu/source/common/stringpiece.cpp",
"../externals/icu/source/common/stringtriebuilder.cpp",
"../externals/icu/source/common/uarrsort.c",
"../externals/icu/source/common/ubidi.c",
"../externals/icu/source/common/ubidi_props.c",
"../externals/icu/source/common/ubidiln.c",
"../externals/icu/source/common/ubidiwrt.c",
"../externals/icu/source/common/ubrk.cpp",
"../externals/icu/source/common/ucase.cpp",
"../externals/icu/source/common/ucasemap.cpp",
"../externals/icu/source/common/ucasemap_titlecase_brkiter.cpp",
"../externals/icu/source/common/ucat.c",
"../externals/icu/source/common/uchar.c",
"../externals/icu/source/common/ucharstrie.cpp",
"../externals/icu/source/common/ucharstriebuilder.cpp",
"../externals/icu/source/common/ucharstrieiterator.cpp",
"../externals/icu/source/common/uchriter.cpp",
"../externals/icu/source/common/ucln_cmn.cpp",
"../externals/icu/source/common/ucmndata.c",
"../externals/icu/source/common/ucnv.c",
"../externals/icu/source/common/ucnv2022.cpp",
"../externals/icu/source/common/ucnv_bld.cpp",
"../externals/icu/source/common/ucnv_cb.c",
"../externals/icu/source/common/ucnv_cnv.c",
"../externals/icu/source/common/ucnv_ct.c",
"../externals/icu/source/common/ucnv_err.c",
"../externals/icu/source/common/ucnv_ext.cpp",
"../externals/icu/source/common/ucnv_io.cpp",
"../externals/icu/source/common/ucnv_lmb.c",
"../externals/icu/source/common/ucnv_set.c",
"../externals/icu/source/common/ucnv_u16.c",
"../externals/icu/source/common/ucnv_u32.c",
"../externals/icu/source/common/ucnv_u7.c",
"../externals/icu/source/common/ucnv_u8.c",
"../externals/icu/source/common/ucnvbocu.cpp",
"../externals/icu/source/common/ucnvdisp.c",
"../externals/icu/source/common/ucnvhz.c",
"../externals/icu/source/common/ucnvisci.c",
"../externals/icu/source/common/ucnvlat1.c",
"../externals/icu/source/common/ucnvmbcs.cpp",
"../externals/icu/source/common/ucnvscsu.c",
"../externals/icu/source/common/ucnvsel.cpp",
"../externals/icu/source/common/ucol_swp.cpp",
"../externals/icu/source/common/udata.cpp",
"../externals/icu/source/common/udatamem.c",
"../externals/icu/source/common/udataswp.c",
"../externals/icu/source/common/uenum.c",
"../externals/icu/source/common/uhash.c",
"../externals/icu/source/common/uhash_us.cpp",
"../externals/icu/source/common/uidna.cpp",
"../externals/icu/source/common/uinit.cpp",
"../externals/icu/source/common/uinvchar.c",
"../externals/icu/source/common/uiter.cpp",
"../externals/icu/source/common/ulist.c",
"../externals/icu/source/common/ulistformatter.cpp",
"../externals/icu/source/common/uloc.cpp",
"../externals/icu/source/common/uloc_keytype.cpp",
"../externals/icu/source/common/uloc_tag.c",
"../externals/icu/source/common/umapfile.c",
"../externals/icu/source/common/umath.c",
"../externals/icu/source/common/umutex.cpp",
"../externals/icu/source/common/unames.cpp",
"../externals/icu/source/common/unifiedcache.cpp",
"../externals/icu/source/common/unifilt.cpp",
"../externals/icu/source/common/unifunct.cpp",
"../externals/icu/source/common/uniset.cpp",
"../externals/icu/source/common/uniset_closure.cpp",
"../externals/icu/source/common/uniset_props.cpp",
"../externals/icu/source/common/unisetspan.cpp",
"../externals/icu/source/common/unistr.cpp",
"../externals/icu/source/common/unistr_case.cpp",
"../externals/icu/source/common/unistr_case_locale.cpp",
"../externals/icu/source/common/unistr_cnv.cpp",
"../externals/icu/source/common/unistr_props.cpp",
"../externals/icu/source/common/unistr_titlecase_brkiter.cpp",
"../externals/icu/source/common/unorm.cpp",
"../externals/icu/source/common/unormcmp.cpp",
"../externals/icu/source/common/uobject.cpp",
"../externals/icu/source/common/uprops.cpp",
"../externals/icu/source/common/ures_cnv.c",
"../externals/icu/source/common/uresbund.cpp",
"../externals/icu/source/common/uresdata.cpp",
"../externals/icu/source/common/uresource.cpp",
"../externals/icu/source/common/usc_impl.c",
"../externals/icu/source/common/uscript.c",
"../externals/icu/source/common/uscript_props.cpp",
"../externals/icu/source/common/uset.cpp",
"../externals/icu/source/common/uset_props.cpp",
"../externals/icu/source/common/usetiter.cpp",
"../externals/icu/source/common/ushape.cpp",
"../externals/icu/source/common/usprep.cpp",
"../externals/icu/source/common/ustack.cpp",
"../externals/icu/source/common/ustr_cnv.cpp",
"../externals/icu/source/common/ustr_titlecase_brkiter.cpp",
"../externals/icu/source/common/ustr_wcs.cpp",
"../externals/icu/source/common/ustrcase.cpp",
"../externals/icu/source/common/ustrcase_locale.cpp",
"../externals/icu/source/common/ustrenum.cpp",
"../externals/icu/source/common/ustrfmt.c",
"../externals/icu/source/common/ustring.cpp",
"../externals/icu/source/common/ustrtrns.cpp",
"../externals/icu/source/common/utext.cpp",
"../externals/icu/source/common/utf_impl.c",
"../externals/icu/source/common/util.cpp",
"../externals/icu/source/common/util_props.cpp",
"../externals/icu/source/common/utrace.c",
"../externals/icu/source/common/utrie.cpp",
"../externals/icu/source/common/utrie2.cpp",
"../externals/icu/source/common/utrie2_builder.cpp",
"../externals/icu/source/common/uts46.cpp",
"../externals/icu/source/common/utypes.c",
"../externals/icu/source/common/uvector.cpp",
"../externals/icu/source/common/uvectr32.cpp",
"../externals/icu/source/common/uvectr64.cpp",
"../externals/icu/source/common/wintz.c",
]
if (is_win) {
deps = [
":icudata",
]
public_defines += [
"U_NOEXCEPT=",
"U_STATIC_IMPLEMENTATION",
]
libs = [ "Advapi32.lib" ]
sources += [ "../externals/icu/source/stubdata/stubdata.c" ]
} else {
if (is_ios) {
sources += [ "../externals/icu/mac/icudtl_dat.S" ]
} else {
sources += [ "../externals/icu/$current_os/icudtl_dat.S" ]
}
libs = [ "dl" ]
}
}
if (is_win) {
copy("icudata") {
sources = [
"../externals/icu/windows/icudt.dll",
]
outputs = [
"$root_out_dir/icudt.dll",
]
data = outputs
}
}
}