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