blob: 167f6b0c3c05d8e2ec95d0a5baadcee19e1afe3c [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,
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",
Colin Cross27edc0b2015-11-19 14:24:58 -080030 "src/cxa_personality.cpp",
31 "src/cxa_thread_atexit.cpp",
32 "src/cxa_unexpected.cpp",
33 "src/cxa_vector.cpp",
34 "src/cxa_virtual.cpp",
Dan Albert498f0312016-11-17 13:55:40 -080035 "src/fallback_malloc.cpp",
Colin Cross27edc0b2015-11-19 14:24:58 -080036 "src/private_typeinfo.cpp",
Dan Albert9dd52f42017-01-27 11:17:10 -080037 "src/stdlib_exception.cpp",
Dan Albert2eddfdf2018-02-07 17:24:02 -080038 "src/stdlib_new_delete.cpp",
Dan Albert9dd52f42017-01-27 11:17:10 -080039 "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"],
Chih-Hung Hsieh3b3514c2017-09-28 13:56:31 -070045 cflags: [
46 "-Wall",
47 "-Werror",
48 ],
Colin Cross27edc0b2015-11-19 14:24:58 -080049 cppflags: [
50 "-std=c++14",
51 "-fexceptions",
Colin Cross27edc0b2015-11-19 14:24:58 -080052 "-Wextra",
53 "-Wno-unused-function",
Colin Cross27edc0b2015-11-19 14:24:58 -080054 ],
Colin Cross032303c2016-04-07 13:28:30 -070055 sanitize: {
56 never: true,
57 },
Dan Willemsena2140be2015-09-11 13:09:25 -070058 stl: "none",
59 rtti: true,
60 arch: {
61 arm: {
Colin Cross27edc0b2015-11-19 14:24:58 -080062 include_dirs: ["external/libunwind_llvm/include"],
Dan Willemsena2140be2015-09-11 13:09:25 -070063 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"],
64 },
65 arm64: {
66 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
67 },
68 mips: {
69 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
70 },
71 mips64: {
72 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
73 },
74 x86: {
75 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
76 },
77 x86_64: {
78 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
79 },
80 },
81 target: {
82 android: {
83 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
84 },
85 darwin: {
86 // libcxxabi really doesn't like the non-LLVM assembler on Darwin
87 asflags: ["-integrated-as"],
Dan Albertfd5cfb82018-01-17 20:04:10 -080088 cflags: ["-integrated-as", "-D_LIBCPP_DISABLE_AVAILABILITY"],
Dan Willemsena2140be2015-09-11 13:09:25 -070089 cppflags: ["-integrated-as"],
90 },
Dan Willemsen8008d242016-11-04 12:26:06 -070091 linux_bionic: {
92 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
93 enabled: true,
94 },
Dan Willemsena2140be2015-09-11 13:09:25 -070095 },
96
97}