xref: /aosp_15_r20/external/libutf/Android.bp (revision e72f39528b91793251d8cc21b78f3f8706ae7c47)
1*e72f3952SAlexander Dorokhine// We only build the static library at the moment.
2*e72f3952SAlexander Dorokhinepackage {
3*e72f3952SAlexander Dorokhine    default_applicable_licenses: ["external_libutf_license"],
4*e72f3952SAlexander Dorokhine}
5*e72f3952SAlexander Dorokhine
6*e72f3952SAlexander Dorokhine// Added automatically by a large-scale-change that took the approach of
7*e72f3952SAlexander Dorokhine// 'apply every license found to every target'. While this makes sure we respect
8*e72f3952SAlexander Dorokhine// every license restriction, it may not be entirely correct.
9*e72f3952SAlexander Dorokhine//
10*e72f3952SAlexander Dorokhine// e.g. GPL in an MIT project might only apply to the contrib/ directory.
11*e72f3952SAlexander Dorokhine//
12*e72f3952SAlexander Dorokhine// Please consider splitting the single license below into multiple licenses,
13*e72f3952SAlexander Dorokhine// taking care not to lose any license_kind information, and overriding the
14*e72f3952SAlexander Dorokhine// default license using the 'licenses: [...]' property on targets as needed.
15*e72f3952SAlexander Dorokhine//
16*e72f3952SAlexander Dorokhine// For unused files, consider creating a 'fileGroup' with "//visibility:private"
17*e72f3952SAlexander Dorokhine// to attach the license to, and including a comment whether the files may be
18*e72f3952SAlexander Dorokhine// used in the current project.
19*e72f3952SAlexander Dorokhine// See: http://go/android-license-faq
20*e72f3952SAlexander Dorokhinelicense {
21*e72f3952SAlexander Dorokhine    name: "external_libutf_license",
22*e72f3952SAlexander Dorokhine    visibility: [":__subpackages__"],
23*e72f3952SAlexander Dorokhine    license_kinds: [
24*e72f3952SAlexander Dorokhine        "SPDX-license-identifier-LPL-1.02",
25*e72f3952SAlexander Dorokhine        "SPDX-license-identifier-MIT",
26*e72f3952SAlexander Dorokhine    ],
27*e72f3952SAlexander Dorokhine    license_text: [
28*e72f3952SAlexander Dorokhine        "NOTICE",
29*e72f3952SAlexander Dorokhine    ],
30*e72f3952SAlexander Dorokhine}
31*e72f3952SAlexander Dorokhine
32*e72f3952SAlexander Dorokhinecc_library_static {
33*e72f3952SAlexander Dorokhine    name: "libutf",
34*e72f3952SAlexander Dorokhine    srcs: [
35*e72f3952SAlexander Dorokhine        "rune.c",
36*e72f3952SAlexander Dorokhine        "runestrcat.c",
37*e72f3952SAlexander Dorokhine        "runestrchr.c",
38*e72f3952SAlexander Dorokhine        "runestrcmp.c",
39*e72f3952SAlexander Dorokhine        "runestrcpy.c",
40*e72f3952SAlexander Dorokhine        "runestrdup.c",
41*e72f3952SAlexander Dorokhine        "runestrlen.c",
42*e72f3952SAlexander Dorokhine        "runestrecpy.c",
43*e72f3952SAlexander Dorokhine        "runestrncat.c",
44*e72f3952SAlexander Dorokhine        "runestrncmp.c",
45*e72f3952SAlexander Dorokhine        "runestrncpy.c",
46*e72f3952SAlexander Dorokhine        "runestrrchr.c",
47*e72f3952SAlexander Dorokhine        "runestrstr.c",
48*e72f3952SAlexander Dorokhine        "runetype.c",
49*e72f3952SAlexander Dorokhine        "utfecpy.c",
50*e72f3952SAlexander Dorokhine        "utflen.c",
51*e72f3952SAlexander Dorokhine        "utfnlen.c",
52*e72f3952SAlexander Dorokhine        "utfrrune.c",
53*e72f3952SAlexander Dorokhine        "utfrune.c",
54*e72f3952SAlexander Dorokhine        "utfutf.c",
55*e72f3952SAlexander Dorokhine    ],
56*e72f3952SAlexander Dorokhine    cflags: [
57*e72f3952SAlexander Dorokhine        "-O3",
58*e72f3952SAlexander Dorokhine        "-Wall",
59*e72f3952SAlexander Dorokhine        "-Wno-missing-braces",
60*e72f3952SAlexander Dorokhine        "-Wno-parentheses",
61*e72f3952SAlexander Dorokhine        "-Wno-switch",
62*e72f3952SAlexander Dorokhine    ],
63*e72f3952SAlexander Dorokhine    export_include_dirs: ["."],
64*e72f3952SAlexander Dorokhine    arch: {
65*e72f3952SAlexander Dorokhine        arm: {
66*e72f3952SAlexander Dorokhine            instruction_set: "arm",
67*e72f3952SAlexander Dorokhine        },
68*e72f3952SAlexander Dorokhine    },
69*e72f3952SAlexander Dorokhine    sdk_version: "14",
70*e72f3952SAlexander Dorokhine    min_sdk_version: "14",
71*e72f3952SAlexander Dorokhine    apex_available: [
72*e72f3952SAlexander Dorokhine        "//apex_available:platform",
73*e72f3952SAlexander Dorokhine        "com.android.appsearch",
74*e72f3952SAlexander Dorokhine        "com.android.extservices",
75*e72f3952SAlexander Dorokhine    ],
76*e72f3952SAlexander Dorokhine}
77