113 lines
3.0 KiB
Plaintext
113 lines
3.0 KiB
Plaintext
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"],
|
|
},
|
|
},
|
|
}
|