blob: 1debdaa76404befa5f75c78cabd7c3b22db2d008 [file] [log] [blame]
Dan Willemsena2140be2015-09-11 13:09:25 -07001//
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
Dan Willemsena2140be2015-09-11 13:09:25 -070017cc_library_static {
18 name: "libc++abi",
19 host_supported: true,
20 clang: true,
Colin Cross27edc0b2015-11-19 14:24:58 -080021 srcs: [
22 "src/abort_message.cpp",
23 "src/cxa_aux_runtime.cpp",
24 "src/cxa_default_handlers.cpp",
25 "src/cxa_demangle.cpp",
26 "src/cxa_exception.cpp",
27 "src/cxa_exception_storage.cpp",
28 "src/cxa_guard.cpp",
29 "src/cxa_handlers.cpp",
30 "src/cxa_new_delete.cpp",
31 "src/cxa_personality.cpp",
32 "src/cxa_thread_atexit.cpp",
33 "src/cxa_unexpected.cpp",
34 "src/cxa_vector.cpp",
35 "src/cxa_virtual.cpp",
Dan Albert498f0312016-11-17 13:55:40 -080036 "src/fallback_malloc.cpp",
Colin Cross27edc0b2015-11-19 14:24:58 -080037 "src/private_typeinfo.cpp",
Dan Albert9dd52f42017-01-27 11:17:10 -080038 "src/stdlib_exception.cpp",
39 "src/stdlib_stdexcept.cpp",
40 "src/stdlib_typeinfo.cpp",
Colin Cross27edc0b2015-11-19 14:24:58 -080041 ],
42 include_dirs: ["external/libcxx/include"],
43 local_include_dirs: ["include"],
44 export_include_dirs: ["include"],
45 cppflags: [
46 "-std=c++14",
47 "-fexceptions",
48 "-Wall",
49 "-Wextra",
50 "-Wno-unused-function",
51 "-Werror",
52 ],
Colin Cross032303c2016-04-07 13:28:30 -070053 sanitize: {
54 never: true,
55 },
Dan Willemsena2140be2015-09-11 13:09:25 -070056 stl: "none",
57 rtti: true,
58 arch: {
59 arm: {
Colin Cross27edc0b2015-11-19 14:24:58 -080060 include_dirs: ["external/libunwind_llvm/include"],
Dan Willemsena2140be2015-09-11 13:09:25 -070061 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"],
62 },
63 arm64: {
64 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
65 },
66 mips: {
67 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
68 },
69 mips64: {
70 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
71 },
72 x86: {
73 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
74 },
75 x86_64: {
76 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
77 },
78 },
79 target: {
80 android: {
81 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
82 },
83 darwin: {
84 // libcxxabi really doesn't like the non-LLVM assembler on Darwin
85 asflags: ["-integrated-as"],
86 cflags: ["-integrated-as"],
87 cppflags: ["-integrated-as"],
88 },
Dan Willemsen8008d242016-11-04 12:26:06 -070089 linux_bionic: {
90 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
91 enabled: true,
92 },
Dan Willemsena2140be2015-09-11 13:09:25 -070093 },
94
95}