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 17LOCAL_PATH := $(call my-dir) 18 19LIBCXXABI_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_thread_atexit.cpp \ 31 src/cxa_unexpected.cpp \ 32 src/cxa_vector.cpp \ 33 src/cxa_virtual.cpp \ 34 src/exception.cpp \ 35 src/private_typeinfo.cpp \ 36 src/stdexcept.cpp \ 37 src/typeinfo.cpp \ 38 39LIBCXXABI_INCLUDES := \ 40 $(LOCAL_PATH)/include \ 41 external/libcxx/include \ 42 43LIBCXXABI_RTTI_FLAG := -frtti 44LIBCXXABI_CPPFLAGS := \ 45 -std=c++14 \ 46 -fexceptions \ 47 -Wall \ 48 -Wextra \ 49 -Wno-unused-function \ 50 -Werror \ 51 52include $(CLEAR_VARS) 53LOCAL_MODULE := libc++abi 54LOCAL_CLANG := true 55LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES) 56LOCAL_C_INCLUDES := $(LIBCXXABI_INCLUDES) 57LOCAL_C_INCLUDES_arm := external/libunwind_llvm/include 58LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 59LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS) -DHAVE___CXA_THREAD_ATEXIT_IMPL 60LOCAL_CPPFLAGS_arm := -DLIBCXXABI_USE_LLVM_UNWINDER=1 61LOCAL_CPPFLAGS_arm64 := -DLIBCXXABI_USE_LLVM_UNWINDER=0 62LOCAL_CPPFLAGS_mips := -DLIBCXXABI_USE_LLVM_UNWINDER=0 63LOCAL_CPPFLAGS_mips64 := -DLIBCXXABI_USE_LLVM_UNWINDER=0 64LOCAL_CPPFLAGS_x86 := -DLIBCXXABI_USE_LLVM_UNWINDER=0 65LOCAL_CPPFLAGS_x86_64 := -DLIBCXXABI_USE_LLVM_UNWINDER=0 66LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG) 67LOCAL_CXX_STL := none 68LOCAL_SANITIZE := never 69include $(BUILD_STATIC_LIBRARY) 70 71include $(CLEAR_VARS) 72LOCAL_MODULE := libc++abi 73LOCAL_CLANG := true 74LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES) 75LOCAL_C_INCLUDES := $(LIBCXXABI_INCLUDES) 76LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include 77LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS) 78LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG) 79LOCAL_MULTILIB := both 80LOCAL_CXX_STL := none 81LOCAL_SANITIZE := never 82 83ifeq ($(HOST_OS),darwin) 84# libcxxabi really doesn't like the non-LLVM assembler on Darwin 85LOCAL_ASFLAGS += -integrated-as 86LOCAL_CFLAGS += -integrated-as 87LOCAL_CPPFLAGS += -integrated-as 88endif 89 90include $(BUILD_HOST_STATIC_LIBRARY) 91