Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 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 | |
| 18 | LOCAL_PATH := $(call my-dir) |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 19 | |
Stephen Hines | 3069461 | 2014-05-14 00:00:32 -0700 | [diff] [blame] | 20 | ifeq (,$(TARGET_BUILD_APPS)) |
| 21 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 22 | # The following list contains platform-independent functionalities. |
| 23 | # |
Shih-wei Liao | cec0726 | 2013-01-26 22:12:04 -0800 | [diff] [blame] | 24 | # Skip apple_versioning.c since it is unused. |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 25 | # Skip atomic.c since it needs to be built separately according to the docs. |
Shih-wei Liao | 4d40231 | 2013-01-26 23:20:02 -0800 | [diff] [blame] | 26 | # Skip gcc_personality_v0.c since it depends on libunwind. |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 27 | libcompiler_rt_common_SRC_FILES := \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 28 | lib/builtins/absvdi2.c \ |
| 29 | lib/builtins/absvsi2.c \ |
| 30 | lib/builtins/absvti2.c \ |
| 31 | lib/builtins/adddf3.c \ |
| 32 | lib/builtins/addsf3.c \ |
| 33 | lib/builtins/addvdi3.c \ |
| 34 | lib/builtins/addvsi3.c \ |
| 35 | lib/builtins/addvti3.c \ |
| 36 | lib/builtins/ashldi3.c \ |
| 37 | lib/builtins/ashlti3.c \ |
| 38 | lib/builtins/ashrdi3.c \ |
| 39 | lib/builtins/ashrti3.c \ |
| 40 | lib/builtins/clear_cache.c \ |
| 41 | lib/builtins/clzdi2.c \ |
| 42 | lib/builtins/clzsi2.c \ |
| 43 | lib/builtins/clzti2.c \ |
| 44 | lib/builtins/cmpdi2.c \ |
| 45 | lib/builtins/cmpti2.c \ |
| 46 | lib/builtins/comparedf2.c \ |
| 47 | lib/builtins/comparesf2.c \ |
Dan Albert | 5148f96 | 2014-06-18 19:32:53 -0700 | [diff] [blame] | 48 | lib/builtins/comparetf2.c \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 49 | lib/builtins/ctzdi2.c \ |
| 50 | lib/builtins/ctzsi2.c \ |
| 51 | lib/builtins/ctzti2.c \ |
| 52 | lib/builtins/divdc3.c \ |
| 53 | lib/builtins/divdf3.c \ |
| 54 | lib/builtins/divdi3.c \ |
| 55 | lib/builtins/divmoddi4.c \ |
| 56 | lib/builtins/divmodsi4.c \ |
| 57 | lib/builtins/divsc3.c \ |
| 58 | lib/builtins/divsf3.c \ |
| 59 | lib/builtins/divsi3.c \ |
| 60 | lib/builtins/divti3.c \ |
| 61 | lib/builtins/divxc3.c \ |
| 62 | lib/builtins/enable_execute_stack.c \ |
| 63 | lib/builtins/eprintf.c \ |
| 64 | lib/builtins/extendsfdf2.c \ |
| 65 | lib/builtins/ffsdi2.c \ |
| 66 | lib/builtins/ffsti2.c \ |
| 67 | lib/builtins/fixdfdi.c \ |
| 68 | lib/builtins/fixdfsi.c \ |
| 69 | lib/builtins/fixdfti.c \ |
| 70 | lib/builtins/fixsfdi.c \ |
| 71 | lib/builtins/fixsfsi.c \ |
| 72 | lib/builtins/fixsfti.c \ |
| 73 | lib/builtins/fixunsdfdi.c \ |
| 74 | lib/builtins/fixunsdfsi.c \ |
| 75 | lib/builtins/fixunsdfti.c \ |
| 76 | lib/builtins/fixunssfdi.c \ |
| 77 | lib/builtins/fixunssfsi.c \ |
| 78 | lib/builtins/fixunssfti.c \ |
| 79 | lib/builtins/fixunsxfdi.c \ |
| 80 | lib/builtins/fixunsxfsi.c \ |
| 81 | lib/builtins/fixunsxfti.c \ |
| 82 | lib/builtins/fixxfdi.c \ |
| 83 | lib/builtins/fixxfti.c \ |
| 84 | lib/builtins/floatdidf.c \ |
| 85 | lib/builtins/floatdisf.c \ |
| 86 | lib/builtins/floatdixf.c \ |
| 87 | lib/builtins/floatsidf.c \ |
| 88 | lib/builtins/floatsisf.c \ |
| 89 | lib/builtins/floattidf.c \ |
| 90 | lib/builtins/floattisf.c \ |
| 91 | lib/builtins/floattixf.c \ |
| 92 | lib/builtins/floatundidf.c \ |
| 93 | lib/builtins/floatundisf.c \ |
| 94 | lib/builtins/floatundixf.c \ |
| 95 | lib/builtins/floatunsidf.c \ |
| 96 | lib/builtins/floatunsisf.c \ |
| 97 | lib/builtins/floatuntidf.c \ |
| 98 | lib/builtins/floatuntisf.c \ |
| 99 | lib/builtins/floatuntixf.c \ |
| 100 | lib/builtins/int_util.c \ |
| 101 | lib/builtins/lshrdi3.c \ |
| 102 | lib/builtins/lshrti3.c \ |
| 103 | lib/builtins/moddi3.c \ |
| 104 | lib/builtins/modsi3.c \ |
| 105 | lib/builtins/modti3.c \ |
| 106 | lib/builtins/muldc3.c \ |
| 107 | lib/builtins/muldf3.c \ |
| 108 | lib/builtins/muldi3.c \ |
| 109 | lib/builtins/mulodi4.c \ |
| 110 | lib/builtins/mulosi4.c \ |
| 111 | lib/builtins/muloti4.c \ |
| 112 | lib/builtins/mulsc3.c \ |
| 113 | lib/builtins/mulsf3.c \ |
| 114 | lib/builtins/multi3.c \ |
| 115 | lib/builtins/mulvdi3.c \ |
| 116 | lib/builtins/mulvsi3.c \ |
| 117 | lib/builtins/mulvti3.c \ |
| 118 | lib/builtins/mulxc3.c \ |
| 119 | lib/builtins/negdf2.c \ |
| 120 | lib/builtins/negdi2.c \ |
| 121 | lib/builtins/negsf2.c \ |
| 122 | lib/builtins/negti2.c \ |
| 123 | lib/builtins/negvdi2.c \ |
| 124 | lib/builtins/negvsi2.c \ |
| 125 | lib/builtins/negvti2.c \ |
| 126 | lib/builtins/paritydi2.c \ |
| 127 | lib/builtins/paritysi2.c \ |
| 128 | lib/builtins/parityti2.c \ |
| 129 | lib/builtins/popcountdi2.c \ |
| 130 | lib/builtins/popcountsi2.c \ |
| 131 | lib/builtins/popcountti2.c \ |
| 132 | lib/builtins/powidf2.c \ |
| 133 | lib/builtins/powisf2.c \ |
| 134 | lib/builtins/powitf2.c \ |
| 135 | lib/builtins/powixf2.c \ |
| 136 | lib/builtins/subdf3.c \ |
| 137 | lib/builtins/subsf3.c \ |
| 138 | lib/builtins/subvdi3.c \ |
| 139 | lib/builtins/subvsi3.c \ |
| 140 | lib/builtins/subvti3.c \ |
| 141 | lib/builtins/trampoline_setup.c \ |
| 142 | lib/builtins/truncdfsf2.c \ |
| 143 | lib/builtins/ucmpdi2.c \ |
| 144 | lib/builtins/ucmpti2.c \ |
| 145 | lib/builtins/udivdi3.c \ |
| 146 | lib/builtins/udivmoddi4.c \ |
| 147 | lib/builtins/udivmodsi4.c \ |
| 148 | lib/builtins/udivmodti4.c \ |
| 149 | lib/builtins/udivsi3.c \ |
| 150 | lib/builtins/udivti3.c \ |
| 151 | lib/builtins/umoddi3.c \ |
| 152 | lib/builtins/umodsi3.c \ |
| 153 | lib/builtins/umodti3.c |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 154 | |
| 155 | # ARM-specific runtimes |
| 156 | libcompiler_rt_arm_SRC_FILES := \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 157 | lib/builtins/arm/aeabi_dcmp.S \ |
| 158 | lib/builtins/arm/aeabi_fcmp.S \ |
| 159 | lib/builtins/arm/aeabi_idivmod.S \ |
| 160 | lib/builtins/arm/aeabi_ldivmod.S \ |
| 161 | lib/builtins/arm/aeabi_memcmp.S \ |
| 162 | lib/builtins/arm/aeabi_memcpy.S \ |
| 163 | lib/builtins/arm/aeabi_memmove.S \ |
| 164 | lib/builtins/arm/aeabi_memset.S \ |
| 165 | lib/builtins/arm/aeabi_uidivmod.S \ |
| 166 | lib/builtins/arm/aeabi_uldivmod.S \ |
| 167 | lib/builtins/arm/comparesf2.S \ |
| 168 | lib/builtins/arm/divmodsi4.S \ |
| 169 | lib/builtins/arm/divsi3.S \ |
| 170 | lib/builtins/arm/modsi3.S \ |
| 171 | lib/builtins/arm/udivmodsi4.S \ |
| 172 | lib/builtins/arm/udivsi3.S \ |
| 173 | lib/builtins/arm/umodsi3.S |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 174 | |
Tim Murray | 6731c55 | 2014-03-10 11:10:47 -0700 | [diff] [blame] | 175 | # ARM64-specific runtimes |
| 176 | libcompiler_rt_arm64_SRC_FILES := |
| 177 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 178 | # MIPS-specific runtimes |
| 179 | libcompiler_rt_mips_SRC_FILES := # nothing to add |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 180 | libcompiler_rt_mips64_SRC_FILES := # nothing to add |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 181 | |
| 182 | # X86-specific runtimes |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 183 | libcompiler_rt_x86_SRC_FILES := \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 184 | lib/builtins/i386/ashldi3.S \ |
| 185 | lib/builtins/i386/ashrdi3.S \ |
| 186 | lib/builtins/i386/divdi3.S \ |
| 187 | lib/builtins/i386/floatdidf.S \ |
| 188 | lib/builtins/i386/floatdisf.S \ |
| 189 | lib/builtins/i386/floatdixf.S \ |
| 190 | lib/builtins/i386/floatundidf.S \ |
| 191 | lib/builtins/i386/floatundisf.S \ |
| 192 | lib/builtins/i386/floatundixf.S \ |
| 193 | lib/builtins/i386/lshrdi3.S \ |
| 194 | lib/builtins/i386/moddi3.S \ |
| 195 | lib/builtins/i386/muldi3.S \ |
| 196 | lib/builtins/i386/udivdi3.S \ |
| 197 | lib/builtins/i386/umoddi3.S |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 198 | |
Alexey Volkov | 9939506 | 2014-01-17 17:44:56 +0400 | [diff] [blame] | 199 | # X86_64-specific runtimes |
| 200 | libcompiler_rt_x86_64_SRC_FILES := \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 201 | lib/builtins/x86_64/floatundixf.S \ |
| 202 | lib/builtins/x86_64/floatdisf.c \ |
| 203 | lib/builtins/x86_64/floatdidf.c \ |
| 204 | lib/builtins/x86_64/floatdixf.c \ |
| 205 | lib/builtins/x86_64/floatundisf.S \ |
| 206 | lib/builtins/x86_64/floatundidf.S |
Alexey Volkov | 9939506 | 2014-01-17 17:44:56 +0400 | [diff] [blame] | 207 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 208 | # The following list contains functions that are not available in libgcc.a, so |
| 209 | # we potentially need them when using a Clang-built component (e.g., -ftrapv |
| 210 | # with 64-bit integer multiplies. See http://llvm.org/bugs/show_bug.cgi?id=14469.) |
| 211 | libcompiler_rt_extras_SRC_FILES := \ |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 212 | lib/builtins/mulodi4.c |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 213 | |
| 214 | # $(1): arch |
| 215 | define get-libcompiler-rt-source-files |
| 216 | $(if $(findstring $(1),arm),$(call get-libcompiler-rt-arm-source-files), |
| 217 | $(if $(findstring $(1),mips),$(call get-libcompiler-rt-mips-source-files), |
| 218 | $(if $(findstring $(1),x86),$(call get-libcompiler-rt-x86-source-files), |
Alexey Volkov | 9939506 | 2014-01-17 17:44:56 +0400 | [diff] [blame] | 219 | $(if $(findstring $(1),x86_64),$(call get-libcompiler-rt-x86_64-source-files), |
Pavel Chupin | 5534fc3 | 2013-07-25 20:31:56 +0400 | [diff] [blame] | 220 | $(if $(findstring $(1),x32),$(call get-libcompiler-rt-x86-source-files), |
Tim Murray | 6731c55 | 2014-03-10 11:10:47 -0700 | [diff] [blame] | 221 | $(if $(findstring $(1),arm64),$(call get-libcompiler-rt-arm64-source-files), |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 222 | $(if $(findstring $(1),mips64),$(call get-libcompiler-rt-mips64-source-files), |
| 223 | $(error Unsupported ARCH $(1))))))))) |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 224 | endef |
| 225 | |
| 226 | # $(1): source list |
| 227 | # $(2): arch |
| 228 | # |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 229 | # If lib/builtins/<arch>/X.[cS] is included in the source list, we should filter out lib/builtins/X.c |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 230 | # in the result source list (i.e., use the one optimized for the arch.) Otherwise |
| 231 | # there'll be multiple definitions for one symbol. |
| 232 | define filter-libcompiler-rt-common-source-files |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 233 | $(filter-out $(patsubst lib/builtins/$(strip $(2))/%.S,lib/builtins/%.c,\ |
| 234 | $(filter lib/builtins/$(strip $(2))/%.S,$(1))) \ |
| 235 | $(patsubst lib/builtins/$(strip $(2))/%.c,lib/builtins/%.c,\ |
| 236 | $(filter lib/builtins/$(strip $(2))/%.c,$(1))),$(1)) |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 237 | endef |
| 238 | |
Shih-wei Liao | ece6264 | 2013-02-07 07:49:51 -0800 | [diff] [blame] | 239 | define get-libcompiler-rt-arm-common-source-files |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 240 | $(call filter-libcompiler-rt-common-source-files, |
Shih-wei Liao | c8f5519 | 2013-02-07 22:00:08 -0800 | [diff] [blame] | 241 | $(libcompiler_rt_common_SRC_FILES) \ |
Shih-wei Liao | ece6264 | 2013-02-07 07:49:51 -0800 | [diff] [blame] | 242 | $(libcompiler_rt_arm_SRC_FILES), arm) |
| 243 | endef |
| 244 | |
| 245 | # $(1): common runtime list |
| 246 | # |
| 247 | # Add ARM runtimes implemented in VFP |
| 248 | define add-libcompiler-rt-arm-vfp-source-files |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 249 | $(filter-out $(addprefix lib/builtins/,adddf3.c addsf3.c comparedf2.c comparesf2.c \ |
| 250 | arm/comparesf2.S divdf3.c divsf3.c extendsfdf2.c \ |
| 251 | fixdfsi.c fixsfsi.c fixunsdfsi.c fixunssfsi.c \ |
| 252 | floatsidf.c floatsisf.c floatunsidf.c floatunsisf.c \ |
| 253 | muldf3.c mulsf3.c negdf2.c negsf2.c subdf3.c \ |
| 254 | subsf3.c truncdfsf2.c),$(1)) lib/builtins/arm/vfp_alias.S |
Shih-wei Liao | ece6264 | 2013-02-07 07:49:51 -0800 | [diff] [blame] | 255 | endef |
| 256 | |
| 257 | define get-libcompiler-rt-arm-source-files |
| 258 | $(if $(findstring $(ARCH_ARM_HAVE_VFP),true), |
| 259 | $(call add-libcompiler-rt-arm-vfp-source-files, |
| 260 | $(call get-libcompiler-rt-arm-common-source-files)), |
| 261 | $(call get-libcompiler-rt-arm-common-source-files)) |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 262 | endef |
| 263 | |
Tim Murray | 6731c55 | 2014-03-10 11:10:47 -0700 | [diff] [blame] | 264 | define get-libcompiler-rt-arm64-source-files |
| 265 | $(call filter-libcompiler-rt-common-source-files, |
| 266 | $(libcompiler_rt_common_SRC_FILES) \ |
| 267 | $(libcompiler_rt_arm64_SRC_FILES),arm64) |
| 268 | endef |
| 269 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 270 | define get-libcompiler-rt-mips-source-files |
| 271 | $(call filter-libcompiler-rt-common-source-files, |
Shih-wei Liao | c8f5519 | 2013-02-07 22:00:08 -0800 | [diff] [blame] | 272 | $(libcompiler_rt_common_SRC_FILES) \ |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 273 | $(libcompiler_rt_mips_SRC_FILES),mips) |
| 274 | endef |
| 275 | |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 276 | define get-libcompiler-rt-mips64-source-files |
| 277 | $(call filter-libcompiler-rt-common-source-files, |
| 278 | $(libcompiler_rt_common_SRC_FILES) \ |
| 279 | $(libcompiler_rt_mips64_SRC_FILES),mips64) |
| 280 | endef |
| 281 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 282 | define get-libcompiler-rt-x86-source-files |
| 283 | $(call filter-libcompiler-rt-common-source-files, |
Shih-wei Liao | c8f5519 | 2013-02-07 22:00:08 -0800 | [diff] [blame] | 284 | $(libcompiler_rt_common_SRC_FILES) \ |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 285 | $(libcompiler_rt_x86_SRC_FILES),i386) |
| 286 | endef |
| 287 | |
Alexey Volkov | 9939506 | 2014-01-17 17:44:56 +0400 | [diff] [blame] | 288 | define get-libcompiler-rt-x86_64-source-files |
| 289 | $(call filter-libcompiler-rt-common-source-files, |
| 290 | $(libcompiler_rt_common_SRC_FILES) \ |
| 291 | $(libcompiler_rt_x86_64_SRC_FILES),x86_64) |
| 292 | endef |
| 293 | |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 294 | #===================================================================== |
Shih-wei Liao | 7f489a3 | 2013-02-07 03:34:40 -0800 | [diff] [blame] | 295 | # Device Static Library: libcompiler_rt-extras |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 296 | #===================================================================== |
| 297 | |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 298 | include $(CLEAR_VARS) |
| 299 | |
Shih-wei Liao | 7f489a3 | 2013-02-07 03:34:40 -0800 | [diff] [blame] | 300 | LOCAL_MODULE := libcompiler_rt-extras |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 301 | LOCAL_MODULE_TAGS := optional |
| 302 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 303 | LOCAL_CLANG := true |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 304 | LOCAL_SRC_FILES := $(libcompiler_rt_extras_SRC_FILES) |
Stephen Hines | 97ac43c | 2013-01-18 17:46:14 -0800 | [diff] [blame] | 305 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 306 | |
Evgeniy Stepanov | dc3865b | 2012-03-13 15:38:23 +0400 | [diff] [blame] | 307 | include $(BUILD_STATIC_LIBRARY) |
| 308 | |
Colin Cross | 47ca89c | 2014-03-14 20:12:30 -0700 | [diff] [blame] | 309 | # Don't build compiler-rt without clang |
| 310 | ifneq ($(WITHOUT_TARGET_CLANG), true) |
| 311 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 312 | #===================================================================== |
Shih-wei Liao | 7f489a3 | 2013-02-07 03:34:40 -0800 | [diff] [blame] | 313 | # Device Static Library: libcompiler_rt |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 314 | #===================================================================== |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 315 | |
| 316 | include $(CLEAR_VARS) |
| 317 | |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 318 | LOCAL_MODULE := libcompiler_rt |
| 319 | LOCAL_CFLAGS_arm += -D__ARM_EABI__ |
| 320 | LOCAL_ASFLAGS := -integrated-as |
| 321 | LOCAL_CLANG := true |
| 322 | LOCAL_SRC_FILES_arm := $(call get-libcompiler-rt-source-files,arm) |
Tim Murray | 6731c55 | 2014-03-10 11:10:47 -0700 | [diff] [blame] | 323 | LOCAL_SRC_FILES_arm64 := $(call get-libcompiler-rt-source-files,arm64) |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 324 | LOCAL_SRC_FILES_mips := $(call get-libcompiler-rt-source-files,mips) |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 325 | LOCAL_SRC_FILES_mips64 := $(call get-libcompiler-rt-source-files,mips64) |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 326 | LOCAL_SRC_FILES_x86 := $(call get-libcompiler-rt-source-files,x86) |
| 327 | LOCAL_SRC_FILES_x86_64 := $(call get-libcompiler-rt-source-files,x86_64) |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 328 | LOCAL_MODULE_TARGET_ARCH := arm arm64 mips mips64 x86 x86_64 |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 329 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 330 | |
| 331 | include $(BUILD_STATIC_LIBRARY) |
| 332 | |
Shih-wei Liao | fba7691 | 2013-01-27 00:56:26 -0800 | [diff] [blame] | 333 | #===================================================================== |
Dan Albert | 95b6e9a | 2014-05-01 17:40:29 -0700 | [diff] [blame] | 334 | # Host Static Library: libcompiler_rt |
| 335 | #===================================================================== |
| 336 | |
| 337 | include $(CLEAR_VARS) |
| 338 | |
| 339 | LOCAL_MODULE := libcompiler_rt |
| 340 | LOCAL_ASFLAGS := -integrated-as |
| 341 | LOCAL_CLANG := true |
| 342 | LOCAL_SRC_FILES := $(call get-libcompiler-rt-source-files,x86_64) |
| 343 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Ian Rogers | a217f3e | 2014-06-05 11:44:01 -0700 | [diff] [blame] | 344 | LOCAL_MULTILIB := both |
Dan Albert | 95b6e9a | 2014-05-01 17:40:29 -0700 | [diff] [blame] | 345 | |
| 346 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 347 | |
| 348 | #===================================================================== |
Dmitriy Ivanov | ba9a7b3 | 2014-03-10 18:00:09 -0700 | [diff] [blame] | 349 | # Device Static Library: libprofile_rt |
| 350 | #===================================================================== |
| 351 | |
| 352 | include $(CLEAR_VARS) |
| 353 | |
| 354 | LOCAL_MODULE = libprofile_rt |
| 355 | LOCAL_SRC_FILES = lib/profile/GCDAProfiling.c |
| 356 | |
| 357 | include $(BUILD_STATIC_LIBRARY) |
| 358 | |
| 359 | #===================================================================== |
Shih-wei Liao | fba7691 | 2013-01-27 00:56:26 -0800 | [diff] [blame] | 360 | # Device Shared Library: libcompiler_rt |
| 361 | #===================================================================== |
Serban Constantinescu | e3c30bf | 2013-10-20 15:36:30 +0100 | [diff] [blame] | 362 | |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 363 | include $(CLEAR_VARS) |
| 364 | |
| 365 | LOCAL_MODULE := libcompiler_rt |
| 366 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 367 | LOCAL_WHOLE_STATIC_LIBRARIES := libcompiler_rt |
Duane Sand | 5b87b3d | 2014-05-20 11:06:29 -0700 | [diff] [blame] | 368 | LOCAL_MODULE_TARGET_ARCH := arm arm64 mips mips64 x86 x86_64 |
Colin Cross | 75d873d | 2014-02-04 16:24:23 -0800 | [diff] [blame] | 369 | |
| 370 | include $(BUILD_SHARED_LIBRARY) |
Shih-wei Liao | fba7691 | 2013-01-27 00:56:26 -0800 | [diff] [blame] | 371 | |
Shih-wei Liao | 139a106 | 2013-01-26 11:29:30 -0800 | [diff] [blame] | 372 | # Build ASan |
| 373 | include $(LOCAL_PATH)/lib/asan/Android.mk |
Tim Murray | 4b4f557 | 2014-03-14 17:46:31 -0700 | [diff] [blame] | 374 | |
Dan Albert | 95b6e9a | 2014-05-01 17:40:29 -0700 | [diff] [blame] | 375 | #===================================================================== |
| 376 | # Host Shared Library: libcompiler_rt |
| 377 | #===================================================================== |
| 378 | |
| 379 | include $(CLEAR_VARS) |
| 380 | |
| 381 | LOCAL_MODULE := libcompiler_rt |
| 382 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 383 | LOCAL_WHOLE_STATIC_LIBRARIES := libcompiler_rt |
| 384 | LOCAL_CPPFLAGS := -nostdinc++ |
| 385 | LOCAL_LDFLAGS := -nodefaultlibs |
| 386 | LOCAL_LDLIBS := -lc -lm |
Ian Rogers | a217f3e | 2014-06-05 11:44:01 -0700 | [diff] [blame] | 387 | LOCAL_MULTILIB := both |
Dan Albert | 95b6e9a | 2014-05-01 17:40:29 -0700 | [diff] [blame] | 388 | |
| 389 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 390 | |
Colin Cross | 47ca89c | 2014-03-14 20:12:30 -0700 | [diff] [blame] | 391 | endif |
Stephen Hines | 3069461 | 2014-05-14 00:00:32 -0700 | [diff] [blame] | 392 | |
| 393 | endif # TARGET_BUILD_APPS only |