1package { 2 default_applicable_licenses: ["external_freetype_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_freetype_license", 21 visibility: [":__subpackages__"], 22 license_kinds: [ 23 "SPDX-license-identifier-BSD", 24 "SPDX-license-identifier-FTL", 25 "SPDX-license-identifier-GPL", 26 "SPDX-license-identifier-GPL-2.0", 27 "SPDX-license-identifier-GPL-3.0", 28 "SPDX-license-identifier-ISC", 29 "SPDX-license-identifier-LGPL", 30 "SPDX-license-identifier-MIT", 31 "SPDX-license-identifier-Zlib", 32 "legacy_unencumbered", 33 ], 34 license_text: [ 35 "NOTICE", 36 ], 37} 38 39cc_defaults { 40 name: "libft2_defaults", 41 host_supported: true, 42 // TODO(b/153609531): remove when no longer needed. 43 native_bridge_supported: true, 44 45 // compile in ARM mode, since the glyph loader/renderer is a hotspot 46 // when loading complex pages in the browser 47 arch: { 48 arm: { 49 instruction_set: "arm", 50 }, 51 }, 52 53 srcs: [ 54 "src/autofit/autofit.c", 55 "src/base/ftbase.c", 56 "src/base/ftbbox.c", 57 "src/base/ftbitmap.c", 58 "src/base/ftdebug.c", 59 "src/base/ftfstype.c", 60 "src/base/ftgasp.c", 61 "src/base/ftglyph.c", 62 "src/base/ftinit.c", 63 "src/base/ftmm.c", 64 "src/base/ftstroke.c", 65 "src/base/fttype1.c", 66 "src/base/ftsystem.c", 67 "src/cid/type1cid.c", 68 "src/cff/cff.c", 69 "src/gzip/ftgzip.c", 70 "src/psaux/psaux.c", 71 "src/pshinter/pshinter.c", 72 "src/psnames/psnames.c", 73 "src/raster/raster.c", 74 "src/sdf/sdf.c", 75 "src/sfnt/sfnt.c", 76 "src/smooth/smooth.c", 77 "src/truetype/truetype.c", 78 "src/type1/type1.c", 79 ], 80 81 export_include_dirs: ["include"], 82 83 cflags: [ 84 "-W", 85 "-Wall", 86 "-Werror", 87 88 "-DDARWIN_NO_CARBON", 89 "-DFT2_BUILD_LIBRARY", 90 91 "-O2", 92 93 // Upstream ignores unused parameter warning 94 "-Wno-unused-parameter", 95 // Disabling some of modules results in warnings 96 "-Wno-unused-variable", 97 ], 98} 99 100cc_library { 101 name: "libft2", 102 defaults: ["libft2_defaults"], 103 104 cflags: [ 105 // Usually these are defined in include/freetype/config/ftoption.h 106 // we have commented them and defined them here to allow for the 107 // no dependency variant libft2.nodep below. 108 "-DFT_CONFIG_OPTION_USE_PNG", 109 "-DFT_CONFIG_OPTION_USE_ZLIB", 110 111 // the following is for testing only, and should not be used in final 112 // builds of the product 113 // "-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER", 114 ], 115 116 shared_libs: [ 117 "libpng", 118 "libz", 119 ], 120 121 target: { 122 android: { 123 cflags: [ 124 "-fPIC", 125 "-DPIC", 126 ], 127 }, 128 not_windows: { 129 cflags: [ 130 "-fPIC", 131 "-DPIC", 132 ], 133 }, 134 windows: { 135 enabled: true, 136 }, 137 }, 138 139 llndk: { 140 private: true, 141 symbol_file: "libft2.map.txt", 142 }, 143} 144 145// variant of libft2 without any library dependencies. 146cc_library_static { 147 name: "libft2.nodep", 148 vendor_available: true, 149 defaults: ["libft2_defaults"], 150} 151