Android.bp revision 4cab55f53581c3ecc2b080d5ce7f495458433a74
1// Copyright (C) 2013 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Generate unicode emoji data from UCD.
16genrule {
17    name: "gen-emoji-header",
18    cmd: "python $(location unicode_emoji_h_gen.py) -i $(in) -o $(out)",
19    srcs: ["emoji-data.txt"],
20    out: ["generated/UnicodeData.h"],
21    tool_files: ["unicode_emoji_h_gen.py"],
22}
23
24cc_library {
25    name: "libminikin",
26    host_supported: true,
27    srcs: [
28        "Hyphenator.cpp",
29    ],
30    target: {
31        android: {
32            srcs: [
33                "AnalyzeStyle.cpp",
34                "CmapCoverage.cpp",
35                "FontCollection.cpp",
36                "FontFamily.cpp",
37                "FontLanguage.cpp",
38                "FontLanguageListCache.cpp",
39                "GraphemeBreak.cpp",
40                "HbFontCache.cpp",
41                "Layout.cpp",
42                "LayoutUtils.cpp",
43                "LineBreaker.cpp",
44                "Measurement.cpp",
45                "MinikinInternal.cpp",
46                "MinikinRefCounted.cpp",
47                "MinikinFont.cpp",
48                "MinikinFontFreeType.cpp",
49                "SparseBitSet.cpp",
50                "WordBreaker.cpp",
51            ],
52            shared_libs: [
53                "libharfbuzz_ng",
54                "libft2",
55                "libz",
56                "libutils",
57            ],
58            // TODO: clean up Minikin so it doesn't need the freetype include
59            export_shared_lib_headers: ["libft2"],
60        },
61    },
62    generated_headers: ["gen-emoji-header"],
63    cppflags: [
64        "-Werror",
65        "-Wall",
66        "-Wextra",
67    ],
68    product_variables: {
69        debuggable: {
70            // Enable race detection on eng and userdebug build.
71            cppflags: ["-DENABLE_RACE_DETECTION"],
72        },
73    },
74    shared_libs: [
75        "liblog",
76        "libicuuc",
77    ],
78    header_libs: ["libminikin_headers"],
79    export_header_lib_headers: ["libminikin_headers"],
80    export_shared_lib_headers: ["libicuuc"],
81
82    clang: true,
83    sanitize: {
84        misc_undefined: [
85            "signed-integer-overflow",
86            // b/26432628.
87            //"unsigned-integer-overflow",
88        ],
89    },
90}
91