1//
2// Copyright (C) 2014 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// host + device static lib
18cc_library_static {
19    host_supported: true,
20    name: "libc++_static",
21    clang: true,
22    srcs: [
23        "src/algorithm.cpp",
24        "src/any.cpp",
25        "src/bind.cpp",
26        "src/chrono.cpp",
27        "src/condition_variable.cpp",
28        "src/debug.cpp",
29        "src/exception.cpp",
30        "src/future.cpp",
31        "src/hash.cpp",
32        "src/ios.cpp",
33        "src/iostream.cpp",
34        "src/locale.cpp",
35        "src/memory.cpp",
36        "src/mutex.cpp",
37        "src/new.cpp",
38        "src/optional.cpp",
39        "src/random.cpp",
40        "src/regex.cpp",
41        "src/shared_mutex.cpp",
42        "src/stdexcept.cpp",
43        "src/string.cpp",
44        "src/strstream.cpp",
45        "src/system_error.cpp",
46        "src/thread.cpp",
47        "src/typeinfo.cpp",
48        "src/utility.cpp",
49        "src/valarray.cpp",
50    ],
51    local_include_dirs: ["include"],
52    export_include_dirs: ["include"],
53    cppflags: [
54        "-std=c++14",
55        "-nostdinc++",
56        "-fexceptions",
57    ],
58    rtti: true,
59    whole_static_libs: [
60        "libc++abi",
61    ],
62    stl: "none",
63}
64
65// host + device dynamic lib
66cc_library_shared {
67    host_supported: true,
68    name: "libc++",
69    clang: true,
70    whole_static_libs: ["libc++_static"],
71    stl: "none",
72
73    target: {
74        android: {
75            shared_libs: ["libdl"],
76        },
77        android_arm: {
78            static_libs: ["libunwind_llvm"],
79            ldflags: ["-Wl,--exclude-libs,libunwind_llvm.a"],
80        },
81        host: {
82            ldflags: ["-nodefaultlibs"],
83        },
84        darwin: {
85            unexported_symbols_list: "lib/libc++unexp.exp",
86            force_symbols_not_weak_list: "lib/notweak.exp",
87            force_symbols_weak_list: "lib/weak.exp",
88        },
89
90        linux: {
91            host_ldlibs: [
92                "-lrt",
93                "-lpthread",
94                "-ldl",
95            ],
96        },
97    },
98}
99
100
101// ANDROIDMK TRANSLATION ERROR: unsupported conditional
102// ifdef LIBCXX_TESTING
103// ANDROIDMK TRANSLATION ERROR: unsupported include
104// include $(LOCAL_PATH)/buildcmds/Android.mk
105
106// ANDROIDMK TRANSLATION ERROR: endif from unsupported contitional
107// endif
108// TARGET_BUILD_APPS
109
110