• 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
19package {
20    // See: http://go/android-license-faq
21    // A large-scale-change added 'default_applicable_licenses' to import
22    // all of the 'license_kinds' from "external_icu_icu4c_license"
23    // to get the below license kinds:
24    //   SPDX-license-identifier-BSD
25    //   SPDX-license-identifier-Unicode-DFS
26    default_applicable_licenses: ["external_icu_icu4c_license"],
27}
28
29cc_defaults {
30    name: "libicui18n_defaults",
31    defaults: ["icu4c_defaults"],
32    srcs: [
33        "*.cpp",
34    ],
35    cflags: [
36        "-D_REENTRANT",
37        "-DU_I18N_IMPLEMENTATION",
38        "-O3",
39        "-fvisibility=hidden",
40
41        "-Wno-unreachable-code-loop-increment",
42    ],
43    rtti: true,
44    target: {
45        android: {
46            cflags: [
47                "-DPIC",
48                "-fPIC",
49            ],
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    apex_available: [
60        "com.android.i18n",
61    ],
62    target: {
63        windows: {
64            enabled: true,
65        },
66    },
67}
68
69//
70// Build for the host and target (device).
71// Allow static builds for host so that they can be statically
72// linked into libandroid_runtime. That enables libandroid_runtime to
73// be shipped on desktops as one file which saves space and complexity.
74//
75cc_library {
76    name: "libicui18n",
77    defaults: ["libicui18n_defaults"],
78    host_supported: true,
79    native_bridge_supported: true,
80    apex_available: [
81        "com.android.i18n",
82        // b/133140750 Clean this up. This is due to the dependency to from libmedia
83        "//apex_available:platform",
84    ],
85    unique_host_soname: true,
86    shared_libs: ["libicuuc"],
87    header_libs: ["libicui18n_headers"],
88    export_header_lib_headers: ["libicui18n_headers"],
89    target: {
90        android: {
91            static: {
92                enabled: false,
93            },
94        },
95    },
96}
97
98cc_library_shared {
99    name: "libicui18n_cts_stub",
100    defaults: ["libicui18n_defaults"],
101    host_supported: false,
102    installable: false,
103    stem: "libicui18n",
104    shared_libs: ["libicuuc"],
105    header_libs: ["libicui18n_headers"],
106    visibility: ["//external/icu:__subpackages__"],
107}
108