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 | |
Bob Badour | 98c858f | 2021-02-12 19:49:33 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["external_libcxxabi_license"], |
| 19 | } |
| 20 | |
| 21 | // Added automatically by a large-scale-change that took the approach of |
| 22 | // 'apply every license found to every target'. While this makes sure we respect |
| 23 | // every license restriction, it may not be entirely correct. |
| 24 | // |
| 25 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 26 | // |
| 27 | // Please consider splitting the single license below into multiple licenses, |
| 28 | // taking care not to lose any license_kind information, and overriding the |
| 29 | // default license using the 'licenses: [...]' property on targets as needed. |
| 30 | // |
| 31 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 32 | // to attach the license to, and including a comment whether the files may be |
| 33 | // used in the current project. |
| 34 | // |
| 35 | // large-scale-change included anything that looked like it might be a license |
| 36 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 37 | // |
| 38 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 39 | // See: http://go/android-license-faq |
| 40 | license { |
| 41 | name: "external_libcxxabi_license", |
| 42 | visibility: [":__subpackages__"], |
| 43 | license_kinds: [ |
| 44 | "SPDX-license-identifier-BSD", |
| 45 | "SPDX-license-identifier-MIT", |
| 46 | "SPDX-license-identifier-NCSA", |
| 47 | ], |
| 48 | license_text: [ |
| 49 | "LICENSE.TXT", |
| 50 | "NOTICE", |
| 51 | ], |
| 52 | } |
| 53 | |
Dan Albert | 8144d21 | 2019-07-23 13:29:41 -0700 | [diff] [blame] | 54 | cc_defaults { |
| 55 | name: "libc++abi_defaults", |
Dan Willemsen | c41479a | 2017-04-07 14:11:56 -0700 | [diff] [blame] | 56 | vendor_available: true, |
Justin Yun | f4aa217 | 2020-11-11 16:26:03 +0900 | [diff] [blame] | 57 | product_available: true, |
Yifan Hong | 2976042 | 2020-01-21 16:44:44 -0800 | [diff] [blame] | 58 | ramdisk_available: true, |
Yifan Hong | a338afc | 2020-10-21 18:42:49 -0700 | [diff] [blame] | 59 | vendor_ramdisk_available: true, |
Jiyong Park | 1607e38 | 2018-04-27 21:48:01 +0900 | [diff] [blame] | 60 | recovery_available: true, |
dimitry | d5744a9 | 2019-05-06 12:34:03 +0200 | [diff] [blame] | 61 | native_bridge_supported: true, |
Dan Albert | 8144d21 | 2019-07-23 13:29:41 -0700 | [diff] [blame] | 62 | include_dirs: ["external/libcxx/include"], |
Jooyung Han | 8e992d7 | 2020-04-16 18:48:28 +0900 | [diff] [blame] | 63 | local_include_dirs: ["include"], |
Dan Albert | 8144d21 | 2019-07-23 13:29:41 -0700 | [diff] [blame] | 64 | export_include_dirs: ["include"], |
| 65 | cflags: [ |
| 66 | "-Wall", |
| 67 | "-Werror", |
| 68 | ], |
| 69 | cppflags: [ |
| 70 | "-std=c++14", |
| 71 | "-fexceptions", |
| 72 | "-Wextra", |
| 73 | "-Wno-unused-function", |
| 74 | "-Wno-implicit-fallthrough", |
| 75 | // src/cxa_demangle.cpp:2591 -Wimplicit-fallthrough |
| 76 | ], |
| 77 | sanitize: { |
| 78 | never: true, |
| 79 | }, |
| 80 | stl: "none", |
| 81 | rtti: true, |
| 82 | } |
| 83 | |
| 84 | cc_library_static { |
| 85 | name: "libc++demangle", |
| 86 | defaults: ["libc++abi_defaults"], |
| 87 | host_supported: false, |
| 88 | srcs: ["src/cxa_demangle.cpp"], |
Jiyong Park | ed96332 | 2020-03-07 16:42:32 +0900 | [diff] [blame] | 89 | apex_available: [ |
| 90 | "//apex_available:platform", |
| 91 | "//apex_available:anyapex", |
| 92 | ], |
Jooyung Han | 8e992d7 | 2020-04-16 18:48:28 +0900 | [diff] [blame] | 93 | min_sdk_version: "apex_inherit", |
Dan Albert | 8144d21 | 2019-07-23 13:29:41 -0700 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | cc_library_static { |
| 97 | name: "libc++abi", |
| 98 | defaults: ["libc++abi_defaults"], |
| 99 | host_supported: true, |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 100 | srcs: [ |
| 101 | "src/abort_message.cpp", |
| 102 | "src/cxa_aux_runtime.cpp", |
| 103 | "src/cxa_default_handlers.cpp", |
| 104 | "src/cxa_demangle.cpp", |
| 105 | "src/cxa_exception.cpp", |
| 106 | "src/cxa_exception_storage.cpp", |
| 107 | "src/cxa_guard.cpp", |
| 108 | "src/cxa_handlers.cpp", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 109 | "src/cxa_personality.cpp", |
| 110 | "src/cxa_thread_atexit.cpp", |
| 111 | "src/cxa_unexpected.cpp", |
| 112 | "src/cxa_vector.cpp", |
| 113 | "src/cxa_virtual.cpp", |
Dan Albert | 498f031 | 2016-11-17 13:55:40 -0800 | [diff] [blame] | 114 | "src/fallback_malloc.cpp", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 115 | "src/private_typeinfo.cpp", |
Dan Albert | 9dd52f4 | 2017-01-27 11:17:10 -0800 | [diff] [blame] | 116 | "src/stdlib_exception.cpp", |
Dan Albert | 2eddfdf | 2018-02-07 17:24:02 -0800 | [diff] [blame] | 117 | "src/stdlib_new_delete.cpp", |
Dan Albert | 9dd52f4 | 2017-01-27 11:17:10 -0800 | [diff] [blame] | 118 | "src/stdlib_stdexcept.cpp", |
| 119 | "src/stdlib_typeinfo.cpp", |
Colin Cross | 27edc0b | 2015-11-19 14:24:58 -0800 | [diff] [blame] | 120 | ], |
Ryan Prichard | 64b9839 | 2021-04-02 17:12:53 -0700 | [diff] [blame] | 121 | cppflags: ["-DLIBCXXABI_USE_LLVM_UNWINDER=1"], |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 122 | target: { |
| 123 | android: { |
| 124 | cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"], |
Dan Albert | 8144d21 | 2019-07-23 13:29:41 -0700 | [diff] [blame] | 125 | // Packaged in libc++demangle for Android to reduce bloat. |
| 126 | exclude_srcs: ["src/cxa_demangle.cpp"], |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 127 | }, |
| 128 | darwin: { |
| 129 | // libcxxabi really doesn't like the non-LLVM assembler on Darwin |
| 130 | asflags: ["-integrated-as"], |
Jooyung Han | 8e992d7 | 2020-04-16 18:48:28 +0900 | [diff] [blame] | 131 | cflags: [ |
| 132 | "-integrated-as", |
| 133 | "-D_LIBCPP_DISABLE_AVAILABILITY", |
| 134 | ], |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 135 | cppflags: ["-integrated-as"], |
| 136 | }, |
Dan Willemsen | 8008d24 | 2016-11-04 12:26:06 -0700 | [diff] [blame] | 137 | linux_bionic: { |
| 138 | cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"], |
| 139 | enabled: true, |
| 140 | }, |
Pirama Arumuga Nainar | 2dc3cf8 | 2018-08-08 10:30:41 -0700 | [diff] [blame] | 141 | windows: { |
| 142 | enabled: true, |
| 143 | cppflags: [ |
| 144 | "-D_LIBCPP_HAS_THREAD_API_WIN32", |
| 145 | "-D_LIBCXXABI_BUILDING_LIBRARY", |
| 146 | "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", |
| 147 | "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", |
| 148 | ], |
| 149 | exclude_srcs: [ |
| 150 | "src/cxa_thread_atexit.cpp", |
| 151 | |
| 152 | // Building stdlib_new_delete.cpp in libcxxabi causes |
| 153 | // multiple-definition errors against definitions in |
| 154 | // libcxx/src/new.cpp on Windows. This works on Linux and |
| 155 | // Android where the functions have 'weak' linkage and are |
| 156 | // discarded by the linker. |
| 157 | "src/stdlib_new_delete.cpp", |
| 158 | ], |
| 159 | }, |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 160 | }, |
Jiyong Park | ed96332 | 2020-03-07 16:42:32 +0900 | [diff] [blame] | 161 | apex_available: [ |
| 162 | "//apex_available:platform", |
| 163 | "//apex_available:anyapex", |
| 164 | ], |
Jooyung Han | 8e992d7 | 2020-04-16 18:48:28 +0900 | [diff] [blame] | 165 | min_sdk_version: "apex_inherit", |
Dan Willemsen | a2140be | 2015-09-11 13:09:25 -0700 | [diff] [blame] | 166 | } |
Christopher Ferris | 965a0b9 | 2019-07-18 15:45:40 -0700 | [diff] [blame] | 167 | |
| 168 | cc_fuzz { |
| 169 | name: "cxa_demangle_fuzzer", |
| 170 | host_supported: true, |
| 171 | local_include_dirs: ["include"], |
| 172 | |
| 173 | srcs: [ |
| 174 | "fuzz/cxa_demangle_fuzzer.cpp", |
| 175 | "src/cxa_demangle.cpp", |
| 176 | ], |
| 177 | } |