• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17LIBUNWIND_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
27LIBUNWIND_INCLUDES = [
28    "external/libcxx/include",
29]
30
31LIBUNWIND_LOCAL_INCLUDES = [
32    "include",
33]
34
35LIBUNWIND_CFLAGS = [
36    "-Wall",
37    "-Werror",
38    "-D_LIBUNWIND_USE_DLADDR=0",
39]
40
41LIBUNWIND_CPPFLAGS = [
42    "-std=c++14",
43    "-fexceptions",
44    "-Wextra",
45    "-Wno-implicit-fallthrough",
46    // src/Unwind-EHABI.cpp line 97 and 100 have implicit fallthrough.
47    "-Wno-unused-function",
48    "-Wno-unused-parameter",
49    "-Wno-unused-local-typedef",
50    "-Wno-bitwise-conditional-parentheses", // in src/UnwindCursor.hpp:1437
51]
52
53cc_library_static {
54    name: "libunwind_llvm",
55    sdk_version: "21",
56    vendor_available: true,
57    ramdisk_available: true,
58    recovery_available: true,
59    native_bridge_supported: true,
60    srcs: LIBUNWIND_SRC_FILES,
61    include_dirs: LIBUNWIND_INCLUDES,
62    local_include_dirs: LIBUNWIND_LOCAL_INCLUDES,
63    cflags: LIBUNWIND_CFLAGS,
64    cppflags: LIBUNWIND_CPPFLAGS,
65    stl: "none",
66    system_shared_libs: [],
67    header_libs: ["libc_headers"],
68    sanitize: {
69        never: true,
70    },
71    enabled: false,
72    arch: {
73        arm: {
74            enabled: true,
75        },
76    },
77    min_sdk_version: "apex_inherit",
78}
79