Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 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 | |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 17 | cc_library_static { |
| 18 | name: "libc++abi", |
| 19 | host_supported: true, |
Dan Willemsen | c41479a | 2017-04-07 14:11:56 -0700 | [diff] [blame] | 20 | vendor_available: true, |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 21 | 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 Albert | 498f031 | 2016-11-17 13:55:40 -0800 | [diff] [blame] | 36 | "src/fallback_malloc.cpp", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 37 | "src/private_typeinfo.cpp", |
Dan Albert | 9dd52f4 | 2017-01-27 11:17:10 -0800 | [diff] [blame] | 38 | "src/stdlib_exception.cpp", |
| 39 | "src/stdlib_stdexcept.cpp", |
| 40 | "src/stdlib_typeinfo.cpp", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 41 | ], |
| 42 | include_dirs: ["external/libcxx/include"], |
| 43 | local_include_dirs: ["include"], |
| 44 | export_include_dirs: ["include"], |
Chih-Hung Hsieh | 3b3514c | 2017-09-28 13:56:31 -0700 | [diff] [blame] | 45 | cflags: [ |
| 46 | "-Wall", |
| 47 | "-Werror", |
| 48 | ], |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 49 | cppflags: [ |
| 50 | "-std=c++14", |
| 51 | "-fexceptions", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 52 | "-Wextra", |
| 53 | "-Wno-unused-function", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 54 | ], |
Colin Cross | 032303c | 2016-04-07 13:28:30 -0700 | [diff] [blame] | 55 | sanitize: { |
| 56 | never: true, |
| 57 | }, |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 58 | stl: "none", |
| 59 | rtti: true, |
| 60 | arch: { |
| 61 | arm: { |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 62 | include_dirs: ["external/libunwind_llvm/include"], |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 63 | 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"], |
| 88 | cflags: ["-integrated-as"], |
| 89 | cppflags: ["-integrated-as"], |
| 90 | }, |
Dan Willemsen | 8008d24 | 2016-11-04 12:26:06 -0700 | [diff] [blame] | 91 | linux_bionic: { |
| 92 | cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"], |
| 93 | enabled: true, |
| 94 | }, |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 95 | }, |
| 96 | |
| 97 | } |