blob: 0179e28b06f386b6e6978cfa1e2f057db1035fb7 [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,
Dan Willemsenc41479a2017-04-07 14:11:56 -070020 vendor_available: true,
Dan Willemsena2140be2015-09-11 13:09:25 -070021 clang: true,
Colin Cross27edc0b2015-11-19 14:24:58 -080022 srcs: [
23 "src/abort_message.cpp",
24 "src/cxa_aux_runtime.cpp",
25 "src/cxa_default_handlers.cpp",
26 "src/cxa_demangle.cpp",
27 "src/cxa_exception.cpp",
28 "src/cxa_exception_storage.cpp",
29 "src/cxa_guard.cpp",
30 "src/cxa_handlers.cpp",
31 "src/cxa_new_delete.cpp",
32 "src/cxa_personality.cpp",
33 "src/cxa_thread_atexit.cpp",
34 "src/cxa_unexpected.cpp",
35 "src/cxa_vector.cpp",
36 "src/cxa_virtual.cpp",
Dan Albert498f0312016-11-17 13:55:40 -080037 "src/fallback_malloc.cpp",
Colin Cross27edc0b2015-11-19 14:24:58 -080038 "src/private_typeinfo.cpp",
Dan Albert9dd52f42017-01-27 11:17:10 -080039 "src/stdlib_exception.cpp",
40 "src/stdlib_stdexcept.cpp",
41 "src/stdlib_typeinfo.cpp",
Colin Cross27edc0b2015-11-19 14:24:58 -080042 ],
43 include_dirs: ["external/libcxx/include"],
44 local_include_dirs: ["include"],
45 export_include_dirs: ["include"],
46 cppflags: [
47 "-std=c++14",
48 "-fexceptions",
49 "-Wall",
50 "-Wextra",
51 "-Wno-unused-function",
52 "-Werror",
53 ],
Colin Cross032303c2016-04-07 13:28:30 -070054 sanitize: {
55 never: true,
56 },
Dan Willemsena2140be2015-09-11 13:09:25 -070057 stl: "none",
58 rtti: true,
59 arch: {
60 arm: {
Colin Cross27edc0b2015-11-19 14:24:58 -080061 include_dirs: ["external/libunwind_llvm/include"],
Dan Willemsena2140be2015-09-11 13:09:25 -070062 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"],
63 },
64 arm64: {
65 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
66 },
67 mips: {
68 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
69 },
70 mips64: {
71 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
72 },
73 x86: {
74 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
75 },
76 x86_64: {
77 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
78 },
79 },
80 target: {
81 android: {
82 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
83 },
84 darwin: {
85 // libcxxabi really doesn't like the non-LLVM assembler on Darwin
86 asflags: ["-integrated-as"],
87 cflags: ["-integrated-as"],
88 cppflags: ["-integrated-as"],
89 },
Dan Willemsen8008d242016-11-04 12:26:06 -070090 linux_bionic: {
91 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
92 enabled: true,
93 },
Dan Willemsena2140be2015-09-11 13:09:25 -070094 },
95
96}