Android.mk revision 97ac43c7cf39e8ad2719b4f395093e7415280577
1#
2# Copyright (C) 2012 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
18LOCAL_PATH := $(call my-dir)
19COMPILER_RT_PATH := $(LOCAL_PATH)
20
21#=====================================================================
22# Device Static Library: libbccCompilerRT
23#=====================================================================
24
25include $(CLEAR_VARS)
26
27LOCAL_MODULE := libcompiler-rt
28LOCAL_MODULE_TAGS := optional
29LOCAL_MODULE_CLASS := STATIC_LIBRARIES
30LOCAL_CLANG := true
31LOCAL_CFLAGS := -integrated-as
32ifeq ($(TARGET_ARCH),arm)
33LOCAL_CFLAGS += -D__ARM_EABI__
34endif
35# TODO: split out the asflags.
36LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
37LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
38
39# Pull in platform-independent functionality
40LOCAL_WHOLE_STATIC_LIBRARIES += libcompiler-rt-builtins libcompiler-rt-extras
41
42ifeq ($(TARGET_ARCH),arm)
43  LOCAL_SRC_FILES += \
44    lib/arm/adddf3vfp.S \
45    lib/arm/addsf3vfp.S \
46    lib/arm/divdf3vfp.S \
47    lib/arm/divsf3vfp.S \
48    lib/arm/eqdf2vfp.S \
49    lib/arm/eqsf2vfp.S \
50    lib/arm/extendsfdf2vfp.S \
51    lib/arm/fixdfsivfp.S \
52    lib/arm/fixsfsivfp.S \
53    lib/arm/fixunsdfsivfp.S \
54    lib/arm/fixunssfsivfp.S \
55    lib/arm/floatsidfvfp.S \
56    lib/arm/floatsisfvfp.S \
57    lib/arm/floatunssidfvfp.S \
58    lib/arm/floatunssisfvfp.S \
59    lib/arm/gedf2vfp.S \
60    lib/arm/gesf2vfp.S \
61    lib/arm/gtdf2vfp.S \
62    lib/arm/gtsf2vfp.S \
63    lib/arm/ledf2vfp.S \
64    lib/arm/lesf2vfp.S \
65    lib/arm/ltdf2vfp.S \
66    lib/arm/ltsf2vfp.S \
67    lib/arm/muldf3vfp.S \
68    lib/arm/mulsf3vfp.S \
69    lib/arm/nedf2vfp.S \
70    lib/arm/negdf2vfp.S \
71    lib/arm/negsf2vfp.S \
72    lib/arm/nesf2vfp.S \
73    lib/arm/subdf3vfp.S \
74    lib/arm/subsf3vfp.S \
75    lib/arm/truncdfsf2vfp.S \
76    lib/arm/unorddf2vfp.S \
77    lib/arm/unordsf2vfp.S \
78    lib/arm/aeabi_ldivmod.S \
79    lib/arm/aeabi_uldivmod.S
80else
81  ifeq ($(TARGET_ARCH),x86) # We don't support x86-64 right now
82    LOCAL_SRC_FILES += \
83      lib/i386/ashldi3.S \
84      lib/i386/ashrdi3.S \
85      lib/i386/divdi3.S \
86      lib/i386/floatdidf.S \
87      lib/i386/floatdisf.S \
88      lib/i386/floatdixf.S \
89      lib/i386/floatundidf.S \
90      lib/i386/floatundisf.S \
91      lib/i386/floatundixf.S \
92      lib/i386/lshrdi3.S \
93      lib/i386/moddi3.S \
94      lib/i386/muldi3.S \
95      lib/i386/udivdi3.S \
96      lib/i386/umoddi3.S
97  else
98    ifeq ($(TARGET_ARCH),mips)
99      # nothing to add
100    else
101      $(error Unsupported TARGET_ARCH $(TARGET_ARCH))
102    endif
103  endif
104endif
105
106include $(BUILD_STATIC_LIBRARY)
107
108include $(COMPILER_RT_PATH)/lib/Android.mk
109
110include $(COMPILER_RT_PATH)/lib/asan/Android.mk
111