1package { 2 default_applicable_licenses: ["external_sfntly_license"], 3} 4 5// Added automatically by a large-scale-change that took the approach of 6// 'apply every license found to every target'. While this makes sure we respect 7// every license restriction, it may not be entirely correct. 8// 9// e.g. GPL in an MIT project might only apply to the contrib/ directory. 10// 11// Please consider splitting the single license below into multiple licenses, 12// taking care not to lose any license_kind information, and overriding the 13// default license using the 'licenses: [...]' property on targets as needed. 14// 15// For unused files, consider creating a 'fileGroup' with "//visibility:private" 16// to attach the license to, and including a comment whether the files may be 17// used in the current project. 18// See: http://go/android-license-faq 19license { 20 name: "external_sfntly_license", 21 visibility: [":__subpackages__"], 22 license_kinds: [ 23 "SPDX-license-identifier-Apache-2.0", 24 "SPDX-license-identifier-Zlib", 25 ], 26 license_text: [ 27 "cpp/COPYING.txt", 28 ], 29} 30 31cc_library_static { 32 name: "libsfntly", 33 host_supported: true, 34 srcs: [ 35 "cpp/src/sfntly/*.cc", 36 "cpp/src/sfntly/data/*.cc", 37 "cpp/src/sfntly/port/*.cc", 38 "cpp/src/sfntly/table/**/*.cc", 39 "cpp/src/sample/chromium/font_subsetter.cc", 40 "cpp/src/sample/chromium/subsetter_impl.cc", 41 ], 42 43 cflags: [ 44 "-fstack-protector", 45 "--param=ssp-buffer-size=4", 46 "-Werror", 47 "-fno-exceptions", 48 "-fno-strict-aliasing", 49 "-Wall", 50 "-Wno-unused-parameter", 51 "-Wno-missing-field-initializers", 52 "-fvisibility=hidden", 53 "-fno-tree-sra", 54 "-Wno-psabi", 55 "-ffunction-sections", 56 "-funwind-tables", 57 "-g", 58 "-fno-short-enums", 59 "-finline-limit=64", 60 "-Wa,--noexecstack", 61 "-U_FORTIFY_SOURCE", 62 "-Wno-extra", 63 "-Wno-ignored-qualifiers", 64 "-Wno-type-limits", 65 "-Os", 66 "-fno-ident", 67 "-fdata-sections", 68 "-ffunction-sections", 69 "-fomit-frame-pointer", 70 71 "-DANGLE_DX11", 72 "-D_FILE_OFFSET_BITS=64", 73 "-DNO_TCMALLOC", 74 "-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY", 75 "-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE", 76 "-DDISABLE_NACL", 77 "-DCHROMIUM_BUILD", 78 "-DUSE_LIBJPEG_TURBO=1", 79 "-DUSE_PROPRIETARY_CODECS", 80 "-DENABLE_CONFIGURATION_POLICY", 81 "-DENABLE_GPU=1", 82 "-DUSE_OPENSSL=1", 83 "-DENABLE_EGLIMAGE=1", 84 "-DSFNTLY_NO_EXCEPTION", 85 "-DU_USING_ICU_NAMESPACE=0", 86 "-D__STDC_CONSTANT_MACROS", 87 "-D__STDC_FORMAT_MACROS", 88 "-DANDROID", 89 "-D__GNU_SOURCE=1", 90 "-D_STLP_USE_PTR_SPECIALIZATIONS=1", 91 "-DCHROME_BUILD_ID='\"\"'", 92 "-DNDEBUG", 93 "-DNVALGRIND", 94 "-DDYNAMIC_ANNOTATIONS_ENABLED=0", 95 "-D_FORTIFY_SOURCE=2", 96 ], 97 98 cppflags: [ 99 "-fno-threadsafe-statics", 100 "-fvisibility-inlines-hidden", 101 "-Wsign-compare", 102 "-Wno-abi", 103 "-Wno-error=c++0x-compat", 104 "-Wno-non-virtual-dtor", 105 "-Wno-sign-promo", 106 ], 107 108 debug: { 109 cflags: [ 110 "-UNDEBUG", 111 "-UNVALGRIND", 112 "-DDYNAMIC_ANNOTATIONS_ENABLED=1", 113 "-DWTF_USE_DYNAMIC_ANNOTATIONS=1", 114 "-D_DEBUG", 115 ], 116 }, 117 118 export_include_dirs: ["cpp/src"], 119 120 target: { 121 android: { 122 cflags: ["-fPIC"], 123 shared_libs: ["libandroidicu"], 124 }, 125 host: { 126 shared_libs: [ 127 "libicui18n", 128 "libicuuc" 129 ], 130 }, 131 not_windows: { 132 cflags: ["-fPIC"], 133 }, 134 windows: { 135 enabled: true, 136 // "-fstack-protector" is not used by default on Windows, and enabling it 137 // on one library only prevents this library from being linked successfully 138 // when used as a dependency. So we disable it for Windows. 139 cflags: ["-fno-stack-protector"], 140 }, 141 }, 142} 143