aosp12/external/sfntly/Android.bp

143 lines
4.1 KiB
Plaintext

package {
default_applicable_licenses: ["external_sfntly_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_sfntly_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-Zlib",
],
license_text: [
"cpp/COPYING.txt",
],
}
cc_library_static {
name: "libsfntly",
host_supported: true,
srcs: [
"cpp/src/sfntly/*.cc",
"cpp/src/sfntly/data/*.cc",
"cpp/src/sfntly/port/*.cc",
"cpp/src/sfntly/table/**/*.cc",
"cpp/src/sample/chromium/font_subsetter.cc",
"cpp/src/sample/chromium/subsetter_impl.cc",
],
cflags: [
"-fstack-protector",
"--param=ssp-buffer-size=4",
"-Werror",
"-fno-exceptions",
"-fno-strict-aliasing",
"-Wall",
"-Wno-unused-parameter",
"-Wno-missing-field-initializers",
"-fvisibility=hidden",
"-fno-tree-sra",
"-Wno-psabi",
"-ffunction-sections",
"-funwind-tables",
"-g",
"-fno-short-enums",
"-finline-limit=64",
"-Wa,--noexecstack",
"-U_FORTIFY_SOURCE",
"-Wno-extra",
"-Wno-ignored-qualifiers",
"-Wno-type-limits",
"-Os",
"-fno-ident",
"-fdata-sections",
"-ffunction-sections",
"-fomit-frame-pointer",
"-DANGLE_DX11",
"-D_FILE_OFFSET_BITS=64",
"-DNO_TCMALLOC",
"-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY",
"-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE",
"-DDISABLE_NACL",
"-DCHROMIUM_BUILD",
"-DUSE_LIBJPEG_TURBO=1",
"-DUSE_PROPRIETARY_CODECS",
"-DENABLE_CONFIGURATION_POLICY",
"-DENABLE_GPU=1",
"-DUSE_OPENSSL=1",
"-DENABLE_EGLIMAGE=1",
"-DSFNTLY_NO_EXCEPTION",
"-DU_USING_ICU_NAMESPACE=0",
"-D__STDC_CONSTANT_MACROS",
"-D__STDC_FORMAT_MACROS",
"-DANDROID",
"-D__GNU_SOURCE=1",
"-D_STLP_USE_PTR_SPECIALIZATIONS=1",
"-DCHROME_BUILD_ID='\"\"'",
"-DNDEBUG",
"-DNVALGRIND",
"-DDYNAMIC_ANNOTATIONS_ENABLED=0",
"-D_FORTIFY_SOURCE=2",
],
cppflags: [
"-fno-threadsafe-statics",
"-fvisibility-inlines-hidden",
"-Wsign-compare",
"-Wno-abi",
"-Wno-error=c++0x-compat",
"-Wno-non-virtual-dtor",
"-Wno-sign-promo",
],
debug: {
cflags: [
"-UNDEBUG",
"-UNVALGRIND",
"-DDYNAMIC_ANNOTATIONS_ENABLED=1",
"-DWTF_USE_DYNAMIC_ANNOTATIONS=1",
"-D_DEBUG",
],
},
export_include_dirs: ["cpp/src"],
target: {
android: {
cflags: ["-fPIC"],
shared_libs: ["libandroidicu"],
},
host: {
shared_libs: [
"libicui18n",
"libicuuc"
],
},
not_windows: {
cflags: ["-fPIC"],
},
windows: {
enabled: true,
// "-fstack-protector" is not used by default on Windows, and enabling it
// on one library only prevents this library from being linked successfully
// when used as a dependency. So we disable it for Windows.
cflags: ["-fno-stack-protector"],
},
},
}