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 17package { 18 default_applicable_licenses: ["frameworks_compile_libbcc_license"], 19} 20 21// Added automatically by a large-scale-change that took the approach of 22// 'apply every license found to every target'. While this makes sure we respect 23// every license restriction, it may not be entirely correct. 24// 25// e.g. GPL in an MIT project might only apply to the contrib/ directory. 26// 27// Please consider splitting the single license below into multiple licenses, 28// taking care not to lose any license_kind information, and overriding the 29// default license using the 'licenses: [...]' property on targets as needed. 30// 31// For unused files, consider creating a 'fileGroup' with "//visibility:private" 32// to attach the license to, and including a comment whether the files may be 33// used in the current project. 34// See: http://go/android-license-faq 35license { 36 name: "frameworks_compile_libbcc_license", 37 visibility: [":__subpackages__"], 38 license_kinds: [ 39 "SPDX-license-identifier-Apache-2.0", 40 "SPDX-license-identifier-BSD", 41 "SPDX-license-identifier-MIT", 42 "SPDX-license-identifier-NCSA", 43 "legacy_unencumbered", 44 ], 45 license_text: [ 46 "NOTICE", 47 ], 48} 49 50cc_defaults { 51 name: "libbcc-defaults", 52 defaults: [ 53 "llvm-defaults", 54 "rs-version", 55 "libbcc-targets", 56 ], 57 58 cflags: [ 59 "-Wno-unused-parameter", 60 "-D__DISABLE_ASSERTS", 61 ], 62 63 target: { 64 android: { 65 cflags: [ 66 "-DTARGET_BUILD", 67 ], 68 }, 69 host: { 70 compile_multilib: "first", 71 cflags: [ 72 "-D__HOST__", 73 ], 74 }, 75 }, 76 77 product_variables: { 78 eng: { 79 cflags: ["-U__DISABLE_ASSERTS"], 80 }, 81 }, 82 83 include_dirs: [ 84 "frameworks/compile/libbcc/include", 85 "frameworks/rs", 86 ], 87} 88 89//===================================================================== 90// Architecture Selection 91//===================================================================== 92// Note: We should only use -DFORCE_ARCH_CODEGEN on target build. 93// For the host build, we will include as many architecture as possible, 94// so that we can test the execution engine easily. 95 96cc_defaults { 97 name: "libbcc-targets", 98 arch: { 99 arm: { 100 cflags: [ 101 "-DFORCE_ARM_CODEGEN", 102 "-DARCH_ARM_HAVE_NEON", 103 "-DARCH_ARM_HAVE_VFP", 104 "-DARCH_ARM_HAVE_VFP_D32", 105 "-DPROVIDE_ARM64_CODEGEN", 106 ], 107 }, 108 arm64: { 109 cflags: [ 110 "-DFORCE_ARM64_CODEGEN", 111 "-DARCH_ARM_HAVE_NEON", 112 "-DARCH_ARM_HAVE_VFP", 113 "-DARCH_ARM_HAVE_VFP_D32", 114 "-DDISABLE_CLCORE_NEON", 115 ], 116 }, 117 }, 118 target: { 119 android_x86: { 120 cflags: ["-DFORCE_X86_CODEGEN"], 121 }, 122 android_x86_64: { 123 cflags: ["-DFORCE_X86_64_CODEGEN"], 124 }, 125 arm_on_x86: { 126 cflags: [ 127 "-DPROVIDE_ARM_CODEGEN", 128 "-DFORCE_BUILD_ARM", 129 ], 130 }, 131 arm_on_x86_64: { 132 cflags: [ 133 "-DPROVIDE_ARM_CODEGEN", 134 "-DFORCE_BUILD_ARM", 135 "-DPROVIDE_ARM64_CODEGEN", 136 ], 137 }, 138 }, 139} 140 141subdirs = [ 142 "bcinfo", 143 "lib", 144 "tools", 145] 146