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 17cc_defaults { 18 name: "libbcc-defaults", 19 defaults: [ 20 "llvm-defaults", 21 "rs-version", 22 "libbcc-targets", 23 ], 24 25 cflags: [ 26 "-Wall", 27 "-Wno-unused-parameter", 28 "-Werror", 29 "-D__DISABLE_ASSERTS", 30 ], 31 32 target: { 33 android: { 34 cflags: [ 35 "-DTARGET_BUILD", 36 ], 37 }, 38 host: { 39 compile_multilib: "first", 40 cflags: [ 41 "-D__HOST__", 42 ], 43 }, 44 }, 45 46 product_variables: { 47 eng: { 48 cflags: ["-U__DISABLE_ASSERTS"], 49 }, 50 }, 51 52 include_dirs: [ 53 "frameworks/compile/libbcc/include", 54 "frameworks/rs", 55 ], 56} 57 58//===================================================================== 59// Architecture Selection 60//===================================================================== 61// Note: We should only use -DFORCE_ARCH_CODEGEN on target build. 62// For the host build, we will include as many architecture as possible, 63// so that we can test the execution engine easily. 64 65cc_defaults { 66 name: "libbcc-targets", 67 arch: { 68 arm: { 69 cflags: [ 70 "-DFORCE_ARM_CODEGEN", 71 "-DARCH_ARM_HAVE_VFP", 72 "-DPROVIDE_ARM64_CODEGEN", 73 ], 74 neon: { 75 cflags: [ 76 "-DARCH_ARM_HAVE_VFP_D32", 77 "-DARCH_ARM_HAVE_NEON", 78 ], 79 }, 80 }, 81 arm64: { 82 cflags: [ 83 "-DFORCE_ARM64_CODEGEN", 84 "-DARCH_ARM_HAVE_NEON", 85 "-DARCH_ARM_HAVE_VFP", 86 "-DARCH_ARM_HAVE_VFP_D32", 87 "-DDISABLE_CLCORE_NEON", 88 ], 89 }, 90 }, 91 target: { 92 android_x86: { 93 cflags: ["-DFORCE_X86_CODEGEN"], 94 }, 95 android_x86_64: { 96 cflags: ["-DFORCE_X86_64_CODEGEN"], 97 }, 98 arm_on_x86: { 99 cflags: [ 100 "-DPROVIDE_ARM_CODEGEN", 101 "-DFORCE_BUILD_ARM", 102 ], 103 }, 104 arm_on_x86_64: { 105 cflags: [ 106 "-DPROVIDE_ARM_CODEGEN", 107 "-DFORCE_BUILD_ARM", 108 "-DPROVIDE_ARM64_CODEGEN", 109 ], 110 }, 111 }, 112} 113 114subdirs = [ 115 "bcinfo", 116 "lib", 117 "tools", 118] 119