• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 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// A library of shared initialization code for use by libicuuc.so only.
16package {
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "external_icu_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["external_icu_license"],
23}
24
25cc_library_static {
26    name: "libandroidicuinit",
27    host_supported: true, // for ART host testing.
28    native_bridge_supported: true,
29    srcs: ["*.cpp"],
30    // Caution: Don't invoke the caller, e.g. openCommonData, from this library because it could
31    //   cause an indefinite loop. This library interacts with libicuuc closely, but this library is
32    //   stored in a separate directory to avoid a larger patch which could incur more works when
33    //   updating from the upstream.
34    header_libs: ["libicuuc_headers"],
35    cflags: [
36        "-Wall",
37        "-Werror",
38    ],
39    export_include_dirs: ["include"],
40    target: {
41        android: {
42            cflags: [
43                // -DANDROID_LINK_SHARED_ICU4C to enable access to the full ICU4C.
44                // See external/icu/android_icu4c/include/uconfig_local.h
45                // for more information.
46                "-DANDROID_LINK_SHARED_ICU4C",
47            ],
48            shared_libs: [
49                "libbase",
50                "liblog",
51            ],
52        },
53        native_bridge: {
54            exclude_shared_libs: ["libicuuc"],
55            header_libs: ["libicuuc_headers"],
56            shared_libs: ["libnative_bridge_guest_libicuuc"],
57        },
58    },
59    apex_available: [
60        "com.android.i18n",
61    ],
62    visibility: [
63        "//external/icu/icu4c/source/common",
64    ],
65}
66