• 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    apex_available: [
80        "com.android.i18n",
81        // b/133140750 Clean this up. This is due to the dependency to from libmedia
82        "//apex_available:platform",
83    ],
84    unique_host_soname: true,
85    shared_libs: ["libicuuc"],
86    header_libs: ["libicui18n_headers"],
87    export_header_lib_headers: ["libicui18n_headers"],
88    target: {
89        android: {
90            static: {
91                enabled: false,
92            },
93        },
94    },
95}
96
97cc_library_shared {
98    name: "libicui18n_cts_stub",
99    defaults: ["libicui18n_defaults"],
100    host_supported: false,
101    installable: false,
102    stem: "libicui18n",
103    shared_libs: ["libicuuc"],
104    header_libs: ["libicui18n_headers"],
105    visibility: ["//external/icu:__subpackages__"],
106}
107