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 "-Wall", 60 "-Wno-unused-parameter", 61 "-Werror", 62 "-D__DISABLE_ASSERTS", 63 ], 64 65 target: { 66 android: { 67 cflags: [ 68 "-DTARGET_BUILD", 69 ], 70 }, 71 host: { 72 compile_multilib: "first", 73 cflags: [ 74 "-D__HOST__", 75 ], 76 }, 77 }, 78 79 product_variables: { 80 eng: { 81 cflags: ["-U__DISABLE_ASSERTS"], 82 }, 83 }, 84 85 include_dirs: [ 86 "frameworks/compile/libbcc/include", 87 "frameworks/rs", 88 ], 89} 90 91//===================================================================== 92// Architecture Selection 93//===================================================================== 94// Note: We should only use -DFORCE_ARCH_CODEGEN on target build. 95// For the host build, we will include as many architecture as possible, 96// so that we can test the execution engine easily. 97 98cc_defaults { 99 name: "libbcc-targets", 100 arch: { 101 arm: { 102 cflags: [ 103 "-DFORCE_ARM_CODEGEN", 104 "-DARCH_ARM_HAVE_NEON", 105 "-DARCH_ARM_HAVE_VFP", 106 "-DARCH_ARM_HAVE_VFP_D32", 107 "-DPROVIDE_ARM64_CODEGEN", 108 ], 109 }, 110 arm64: { 111 cflags: [ 112 "-DFORCE_ARM64_CODEGEN", 113 "-DARCH_ARM_HAVE_NEON", 114 "-DARCH_ARM_HAVE_VFP", 115 "-DARCH_ARM_HAVE_VFP_D32", 116 "-DDISABLE_CLCORE_NEON", 117 ], 118 }, 119 }, 120 target: { 121 android_x86: { 122 cflags: ["-DFORCE_X86_CODEGEN"], 123 }, 124 android_x86_64: { 125 cflags: ["-DFORCE_X86_64_CODEGEN"], 126 }, 127 arm_on_x86: { 128 cflags: [ 129 "-DPROVIDE_ARM_CODEGEN", 130 "-DFORCE_BUILD_ARM", 131 ], 132 }, 133 arm_on_x86_64: { 134 cflags: [ 135 "-DPROVIDE_ARM_CODEGEN", 136 "-DFORCE_BUILD_ARM", 137 "-DPROVIDE_ARM64_CODEGEN", 138 ], 139 }, 140 }, 141} 142 143subdirs = [ 144 "bcinfo", 145 "lib", 146 "tools", 147] 148