Stephen Hines | 0467bc4 | 2014-05-05 15:11:12 -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 | # This file contains target-specific defines for projects including LLVM |
| 18 | # and/or libbcc directly. |
| 19 | |
| 20 | LOCAL_CFLAGS_arm += -DFORCE_ARM_CODEGEN |
| 21 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
| 22 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP |
| 23 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 24 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_VFP_D32 |
| 25 | endif |
| 26 | endif |
| 27 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
| 28 | LOCAL_CFLAGS_arm += -DARCH_ARM_HAVE_NEON |
| 29 | endif |
| 30 | |
Tim Murray | a5b1343 | 2014-06-13 15:38:46 -0700 | [diff] [blame] | 31 | LOCAL_CFLAGS_arm64 += -DFORCE_ARM64_CODEGEN -DARCH_ARM_HAVE_NEON -DARCH_ARM_HAVE_VFP -DARCH_ARM_HAVE_VFP_D32 -DDISABLE_CLCORE_NEON |
Stephen Hines | 0467bc4 | 2014-05-05 15:11:12 -0700 | [diff] [blame] | 32 | LOCAL_CFLAGS_mips += -DFORCE_MIPS_CODEGEN |
Dragoslav Sicarov | d5a4204 | 2014-05-22 15:00:18 +0000 | [diff] [blame] | 33 | LOCAL_CFLAGS_mips64 += -DFORCE_MIPS64_CODEGEN |
Stephen Hines | 0467bc4 | 2014-05-05 15:11:12 -0700 | [diff] [blame] | 34 | |
| 35 | LOCAL_CFLAGS_x86 += -DFORCE_X86_CODEGEN |
| 36 | LOCAL_CFLAGS_x86_64 += -DFORCE_X86_64_CODEGEN |
| 37 | |
Tim Murray | 38883df | 2014-10-15 14:05:01 -0700 | [diff] [blame] | 38 | ifeq ($(BUILD_ARM_FOR_X86),true) |
| 39 | LOCAL_CFLAGS_x86 += -DPROVIDE_ARM_CODEGEN -DFORCE_BUILD_ARM |
jgu21 | 6b59b5b | 2015-03-04 03:39:44 -0500 | [diff] [blame] | 40 | LOCAL_CFLAGS_x86_64 += -DPROVIDE_ARM_CODEGEN -DFORCE_BUILD_ARM -DPROVIDE_ARM64_CODEGEN |
Tim Murray | 38883df | 2014-10-15 14:05:01 -0700 | [diff] [blame] | 41 | endif |
| 42 | |
| 43 | |
Stephen Hines | 0467bc4 | 2014-05-05 15:11:12 -0700 | [diff] [blame] | 44 | ifeq (,$(filter $(TARGET_ARCH),arm64 arm mips mips64 x86 x86_64)) |
| 45 | $(error Unsupported architecture $(TARGET_ARCH)) |
| 46 | endif |
| 47 | |