blob: a73be130a45c2a1314ccf7553a950a17d9f8cac0 [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,
Jiyong Park1607e382018-04-27 21:48:01 +090021 recovery_available: 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",
Colin Cross27edc0b2015-11-19 14:24:58 -080031 "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",
Dan Albert2eddfdf2018-02-07 17:24:02 -080039 "src/stdlib_new_delete.cpp",
Dan Albert9dd52f42017-01-27 11:17:10 -080040 "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"],
Chih-Hung Hsieh3b3514c2017-09-28 13:56:31 -070046 cflags: [
47 "-Wall",
48 "-Werror",
49 ],
Colin Cross27edc0b2015-11-19 14:24:58 -080050 cppflags: [
51 "-std=c++14",
52 "-fexceptions",
Colin Cross27edc0b2015-11-19 14:24:58 -080053 "-Wextra",
54 "-Wno-unused-function",
Chih-Hung Hsiehf8126cd2018-09-04 14:16:00 -070055 "-Wno-implicit-fallthrough",
56 // src/cxa_demangle.cpp:2591 -Wimplicit-fallthrough
Colin Cross27edc0b2015-11-19 14:24:58 -080057 ],
Colin Cross032303c2016-04-07 13:28:30 -070058 sanitize: {
59 never: true,
60 },
Dan Willemsena2140be2015-09-11 13:09:25 -070061 stl: "none",
62 rtti: true,
63 arch: {
64 arm: {
Colin Cross27edc0b2015-11-19 14:24:58 -080065 include_dirs: ["external/libunwind_llvm/include"],
Dan Willemsena2140be2015-09-11 13:09:25 -070066 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"],
67 },
68 arm64: {
69 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
70 },
71 mips: {
72 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
73 },
74 mips64: {
75 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
76 },
77 x86: {
78 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
79 },
80 x86_64: {
81 cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=0"],
82 },
83 },
84 target: {
85 android: {
86 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
87 },
88 darwin: {
89 // libcxxabi really doesn't like the non-LLVM assembler on Darwin
90 asflags: ["-integrated-as"],
Dan Albertfd5cfb82018-01-17 20:04:10 -080091 cflags: ["-integrated-as", "-D_LIBCPP_DISABLE_AVAILABILITY"],
Dan Willemsena2140be2015-09-11 13:09:25 -070092 cppflags: ["-integrated-as"],
93 },
Dan Willemsen8008d242016-11-04 12:26:06 -070094 linux_bionic: {
95 cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
96 enabled: true,
97 },
Dan Willemsena2140be2015-09-11 13:09:25 -070098 },
99
100}