blob: f59b4df3f92905b1d0295209621f0fe5bb7d6024 [file] [log] [blame]
Colin Cross1d3ac562016-12-07 14:21:42 -08001//
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",
Colin Cross1d3ac562016-12-07 14:21:42 -080021 "rs-version",
22 "libbcc-targets",
23 ],
24
25 clang: true,
26 cflags: [
27 "-Wall",
28 "-Wno-unused-parameter",
29 "-Werror",
30 "-D__DISABLE_ASSERTS",
31 ],
32
33 target: {
34 android: {
35 cflags: [
36 "-DTARGET_BUILD",
37 ],
38 },
39 host: {
40 compile_multilib: "first",
41 cflags: [
42 "-D__HOST__",
43 ],
44 },
45 },
46
47 product_variables: {
48 eng: {
49 cflags: ["-U__DISABLE_ASSERTS"],
50 },
51 },
52
53 include_dirs: [
54 "frameworks/compile/libbcc/include",
55 "frameworks/rs",
56 ],
57}
58
59//=====================================================================
60// Architecture Selection
61//=====================================================================
62// Note: We should only use -DFORCE_ARCH_CODEGEN on target build.
63// For the host build, we will include as many architecture as possible,
64// so that we can test the execution engine easily.
65
66cc_defaults {
67 name: "libbcc-targets",
68 arch: {
69 arm: {
70 cflags: [
71 "-DFORCE_ARM_CODEGEN",
72 "-DARCH_ARM_HAVE_VFP",
73 ],
74 armv7_a_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 mips: {
91 cflags: ["-DFORCE_MIPS_CODEGEN"],
92 },
93 mips64: {
94 cflags: ["-DFORCE_MIPS64_CODEGEN"],
95 },
96 },
97 target: {
98 android_x86: {
99 cflags: ["-DFORCE_X86_CODEGEN"],
100 },
101 android_x86_64: {
102 cflags: ["-DFORCE_X86_64_CODEGEN"],
103 },
104 arm_on_x86: {
105 cflags: [
106 "-DPROVIDE_ARM_CODEGEN",
107 "-DFORCE_BUILD_ARM",
108 ],
109 },
110 arm_on_x86_64: {
111 cflags: [
112 "-DPROVIDE_ARM_CODEGEN",
113 "-DFORCE_BUILD_ARM",
114 "-DPROVIDE_ARM64_CODEGEN",
115 ],
116 },
117 },
118}
119
Colin Cross1d3ac562016-12-07 14:21:42 -0800120subdirs = [
121 "bcinfo",
122 "lib",
123 "tools",
124]