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: "libicuuc_defaults", 21 srcs: [ 22 "*.cpp", 23 ], 24 25 // We deliberately do not set -DICU_DATA_DIR: ICU4C is configured on Android 26 // using udata_setCommonData. 27 cflags: [ 28 "-D_REENTRANT", 29 "-DU_COMMON_IMPLEMENTATION", 30 31 "-O3", 32 "-fvisibility=hidden", 33 34 "-Wall", 35 "-Werror", 36 "-Wno-unused-parameter", 37 "-Wno-missing-field-initializers", 38 "-Wno-sign-compare", 39 "-Wno-deprecated-declarations", 40 ], 41 42 cppflags: [ 43 "-std=c++11", 44 ], 45 46 rtti: true, 47 48 required: ["icu-data_host_runtime_apex"], 49 50 target: { 51 android: { 52 cflags: [ 53 "-DANDROID_LINK_SHARED_ICU4C", 54 "-DPIC", 55 "-fPIC", 56 ], 57 }, 58 }, 59} 60 61cc_library_headers { 62 name: "libicuuc_headers", 63 host_supported: true, 64 header_libs: [ "icu4c_extra_headers" ], 65 export_header_lib_headers: [ "icu4c_extra_headers" ], 66 export_include_dirs: ["."], 67 target: { 68 windows: { 69 enabled: true, 70 }, 71 }, 72} 73 74// 75// Build for the host and target. 76// 77cc_library_shared { 78 name: "libicuuc", 79 host_supported: true, 80 unique_host_soname: true, 81 defaults: ["libicuuc_defaults"], 82 target: { 83 android: { 84 static_libs: ["libicuuc_stubdata"], 85 }, 86 not_windows: { 87 static_libs: ["libicuuc_stubdata"], 88 }, 89 windows: { 90 enabled: true, 91 // Windows requires importing data as a DLL when building with U_COMMON_IMPLEMENTATION 92 shared_libs: ["libicuuc_stubdata"], 93 }, 94 }, 95 header_libs: [ "libicuuc_headers" ], 96 export_header_lib_headers: [ "libicuuc_headers" ], 97} 98