Dan Albert | e085735 | 2014-04-08 12:04:51 -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 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | LIBCXXABI_SRC_FILES := \ |
| 20 | src/abort_message.cpp \ |
| 21 | src/cxa_aux_runtime.cpp \ |
| 22 | src/cxa_default_handlers.cpp \ |
| 23 | src/cxa_demangle.cpp \ |
| 24 | src/cxa_exception.cpp \ |
| 25 | src/cxa_exception_storage.cpp \ |
| 26 | src/cxa_guard.cpp \ |
| 27 | src/cxa_handlers.cpp \ |
| 28 | src/cxa_new_delete.cpp \ |
| 29 | src/cxa_personality.cpp \ |
| 30 | src/cxa_unexpected.cpp \ |
| 31 | src/cxa_vector.cpp \ |
| 32 | src/cxa_virtual.cpp \ |
| 33 | src/exception.cpp \ |
| 34 | src/fallback_malloc.ipp \ |
| 35 | src/private_typeinfo.cpp \ |
| 36 | src/stdexcept.cpp \ |
| 37 | src/typeinfo.cpp \ |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 38 | |
| 39 | LLVM_UNWIND_SRC_FILES := \ |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 40 | src/Unwind/libunwind.cpp \ |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 41 | src/Unwind/Unwind-EHABI.cpp \ |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 42 | src/Unwind/Unwind-sjlj.c \ |
| 43 | src/Unwind/UnwindLevel1-gcc-ext.c \ |
| 44 | src/Unwind/UnwindLevel1.c \ |
| 45 | src/Unwind/UnwindRegistersSave.S \ |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 46 | src/Unwind/UnwindRegistersRestore.S \ |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 47 | |
| 48 | LIBCXXABI_CFLAGS := \ |
| 49 | -I$(LOCAL_PATH)/include/ \ |
| 50 | |
| 51 | LIBCXXABI_RTTI_FLAG := -frtti |
| 52 | LIBCXXABI_CPPFLAGS := \ |
| 53 | -Iexternal/libcxx/include/ \ |
| 54 | -std=c++11 \ |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 55 | -fexceptions \ |
| 56 | |
| 57 | include $(CLEAR_VARS) |
Dan Albert | ab22a8f | 2014-05-02 18:19:59 -0700 | [diff] [blame] | 58 | LOCAL_MODULE := libc++abi |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 59 | LOCAL_CLANG := true |
| 60 | LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES) |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 61 | LOCAL_SRC_FILES_arm := $(LLVM_UNWIND_SRC_FILES) |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS := $(LIBCXXABI_CFLAGS) |
| 63 | LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS) |
| 64 | LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG) |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 65 | LOCAL_WHOLE_STATIC_LIBRARIES_arm64 := libunwind |
| 66 | LOCAL_WHOLE_STATIC_LIBRARIES_mips := libunwind |
| 67 | LOCAL_WHOLE_STATIC_LIBRARIES_mips64 := libunwind |
| 68 | LOCAL_WHOLE_STATIC_LIBRARIES_x86 := libunwind |
| 69 | LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 := libunwind |
Brian Carlstrom | d5cc515 | 2014-05-09 20:47:13 -0700 | [diff] [blame] | 70 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Dan Albert | 873f858 | 2014-05-09 12:00:06 -0700 | [diff] [blame] | 71 | include $(BUILD_STATIC_LIBRARY) |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 72 | |
| 73 | include $(CLEAR_VARS) |
Dan Albert | ab22a8f | 2014-05-02 18:19:59 -0700 | [diff] [blame] | 74 | LOCAL_MODULE := libc++abi |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 75 | LOCAL_CLANG := true |
| 76 | LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES) |
| 77 | LOCAL_CFLAGS := $(LIBCXXABI_CFLAGS) |
| 78 | LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS) |
Tim Murray | 0943721 | 2014-04-21 13:51:01 -0700 | [diff] [blame] | 79 | |
| 80 | ifeq ($(HOST_OS),darwin) |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 81 | LOCAL_SRC_FILES += $(LLVM_UNWIND_SRC_FILES) src/Unwind/Unwind_AppleExtras.cpp |
Tim Murray | 0943721 | 2014-04-21 13:51:01 -0700 | [diff] [blame] | 82 | # libcxxabi really doesn't like the non-LLVM assembler on Darwin |
| 83 | LOCAL_ASFLAGS += -integrated-as |
| 84 | LOCAL_CFLAGS += -integrated-as |
| 85 | LOCAL_CPPFLAGS += -integrated-as |
Dan Albert | 87a9be2 | 2014-07-02 16:46:09 -0700 | [diff] [blame] | 86 | else |
| 87 | LOCAL_WHOLE_STATIC_LIBRARIES := libunwindbacktrace |
Tim Murray | 0943721 | 2014-04-21 13:51:01 -0700 | [diff] [blame] | 88 | endif |
| 89 | |
Dan Albert | e085735 | 2014-04-08 12:04:51 -0700 | [diff] [blame] | 90 | LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG) |
Brian Carlstrom | d5cc515 | 2014-05-09 20:47:13 -0700 | [diff] [blame] | 91 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Ian Rogers | 2011685 | 2014-06-10 22:36:06 -0700 | [diff] [blame] | 92 | LOCAL_MULTILIB := both |
Dan Albert | 873f858 | 2014-05-09 12:00:06 -0700 | [diff] [blame] | 93 | include $(BUILD_HOST_STATIC_LIBRARY) |