• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2008 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//
16// Common definitions.
17//
18
19cc_defaults {
20    name: "libicui18n_defaults",
21    srcs: [
22        "*.cpp",
23    ],
24    cflags: [
25        "-D_REENTRANT",
26        "-DU_I18N_IMPLEMENTATION",
27        "-O3",
28        "-fvisibility=hidden",
29        "-Wall",
30        "-Werror",
31        "-Wno-unused-parameter",
32        "-Wno-unused-const-variable",
33        "-Wno-unneeded-internal-declaration",
34    ],
35    cppflags: [
36        "-std=c++11",
37    ],
38    rtti: true,
39
40    target: {
41        android: {
42            cflags: [
43                "-DANDROID_LINK_SHARED_ICU4C",
44                "-DPIC",
45                "-fPIC",
46            ],
47        },
48        windows: {
49            enabled: true,
50        },
51    },
52}
53
54cc_library_headers {
55    name: "libicui18n_headers",
56    host_supported: true,
57    native_bridge_supported: true,
58    export_include_dirs: ["."],
59    target: {
60        windows: {
61            enabled: true,
62        },
63    },
64
65    apex_available: [
66        "com.android.art.debug",
67        "com.android.art.release",
68    ],
69}
70
71//
72// Build for the host and target (device).
73// Allow static builds for host so that they can be statically
74// linked into libandroid_runtime. That enables libandroid_runtime to
75// be shipped on desktops as one file which saves space and complexity.
76//
77cc_library {
78    name: "libicui18n",
79    defaults: ["libicui18n_defaults"],
80    host_supported: true,
81    native_bridge_supported: true,
82    apex_available: [
83        "com.android.art.release",
84        "com.android.art.debug",
85        // b/133140750 Clean this up. This is due to the dependency to from libmedia
86        "//apex_available:platform",
87    ],
88    unique_host_soname: true,
89    shared_libs: ["libicuuc"],
90    header_libs: ["libicui18n_headers"],
91    export_header_lib_headers: ["libicui18n_headers"],
92    target: {
93        android: {
94            static: {
95                enabled: false,
96            },
97        },
98    },
99}
100