Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -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 | |
| 17 | LIBUNWIND_SRC_FILES = [ |
| 18 | "src/libunwind.cpp", |
| 19 | "src/Unwind-EHABI.cpp", |
| 20 | "src/Unwind-sjlj.c", |
| 21 | "src/UnwindLevel1-gcc-ext.c", |
| 22 | "src/UnwindLevel1.c", |
| 23 | "src/UnwindRegistersSave.S", |
| 24 | "src/UnwindRegistersRestore.S", |
| 25 | ] |
| 26 | |
| 27 | LIBUNWIND_INCLUDES = [ |
| 28 | "external/libcxx/include", |
| 29 | ] |
| 30 | |
| 31 | LIBUNWIND_LOCAL_INCLUDES = [ |
| 32 | "include", |
| 33 | ] |
| 34 | |
Chih-Hung Hsieh | 328ecd4 | 2017-09-29 12:19:56 -0700 | [diff] [blame] | 35 | LIBUNWIND_CFLAGS = [ |
| 36 | "-Wall", |
| 37 | "-Werror", |
Ryan Prichard | b846b13 | 2019-10-11 14:44:42 -0700 | [diff] [blame] | 38 | "-D_LIBUNWIND_USE_DLADDR=0", |
Chih-Hung Hsieh | 328ecd4 | 2017-09-29 12:19:56 -0700 | [diff] [blame] | 39 | ] |
| 40 | |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 41 | LIBUNWIND_CPPFLAGS = [ |
| 42 | "-std=c++14", |
| 43 | "-fexceptions", |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 44 | "-Wextra", |
Chih-Hung Hsieh | 6136ec0 | 2018-09-04 14:19:27 -0700 | [diff] [blame] | 45 | "-Wno-implicit-fallthrough", |
| 46 | // src/Unwind-EHABI.cpp line 97 and 100 have implicit fallthrough. |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 47 | "-Wno-unused-function", |
| 48 | "-Wno-unused-parameter", |
Dan Albert | 93d99bf | 2017-04-18 14:50:19 -0700 | [diff] [blame] | 49 | "-Wno-unused-local-typedef", |
Chih-Hung Hsieh | 741a8f3 | 2020-01-24 14:41:09 -0800 | [diff] [blame] | 50 | "-Wno-bitwise-conditional-parentheses", // in src/UnwindCursor.hpp:1437 |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 51 | ] |
| 52 | |
| 53 | cc_library_static { |
| 54 | name: "libunwind_llvm", |
Stephen Hines | d9a5f19 | 2016-07-08 15:16:19 -0700 | [diff] [blame] | 55 | sdk_version: "21", |
Dan Willemsen | a756c60 | 2017-04-07 14:13:13 -0700 | [diff] [blame] | 56 | vendor_available: true, |
Yifan Hong | 2bdeda5 | 2020-01-22 17:13:18 -0800 | [diff] [blame] | 57 | ramdisk_available: true, |
Jiyong Park | 2dd29ac | 2018-04-27 21:48:09 +0900 | [diff] [blame] | 58 | recovery_available: true, |
dimitry | ec94f19 | 2019-05-09 14:59:18 +0200 | [diff] [blame] | 59 | native_bridge_supported: true, |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 60 | srcs: LIBUNWIND_SRC_FILES, |
| 61 | include_dirs: LIBUNWIND_INCLUDES, |
| 62 | local_include_dirs: LIBUNWIND_LOCAL_INCLUDES, |
Chih-Hung Hsieh | 328ecd4 | 2017-09-29 12:19:56 -0700 | [diff] [blame] | 63 | cflags: LIBUNWIND_CFLAGS, |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 64 | cppflags: LIBUNWIND_CPPFLAGS, |
| 65 | stl: "none", |
Peter Collingbourne | 956ccc2 | 2020-01-10 12:55:33 -0800 | [diff] [blame] | 66 | system_shared_libs: [], |
| 67 | header_libs: ["libc_headers"], |
Colin Cross | 75720b6 | 2016-04-07 13:28:39 -0700 | [diff] [blame] | 68 | sanitize: { |
| 69 | never: true, |
| 70 | }, |
Dan Willemsen | f171e72 | 2015-11-30 16:00:33 -0800 | [diff] [blame] | 71 | enabled: false, |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 72 | arch: { |
| 73 | arm: { |
Dan Willemsen | f171e72 | 2015-11-30 16:00:33 -0800 | [diff] [blame] | 74 | enabled: true, |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 75 | }, |
| 76 | }, |
Jooyung Han | b6b048f | 2020-04-22 11:46:10 +0900 | [diff] [blame] | 77 | min_sdk_version: "apex_inherit", |
Dan Willemsen | 639eb8d | 2015-09-16 17:25:01 -0700 | [diff] [blame] | 78 | } |