• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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            ],
73            neon: {
74                cflags: [
75                    "-DARCH_ARM_HAVE_VFP_D32",
76                    "-DARCH_ARM_HAVE_NEON",
77                ],
78            },
79        },
80        arm64: {
81            cflags: [
82                "-DFORCE_ARM64_CODEGEN",
83                "-DARCH_ARM_HAVE_NEON",
84                "-DARCH_ARM_HAVE_VFP",
85                "-DARCH_ARM_HAVE_VFP_D32",
86                "-DDISABLE_CLCORE_NEON",
87            ],
88        },
89        mips: {
90            cflags: ["-DFORCE_MIPS_CODEGEN"],
91        },
92        mips64: {
93            cflags: ["-DFORCE_MIPS64_CODEGEN"],
94        },
95    },
96    target: {
97        android_x86: {
98            cflags: ["-DFORCE_X86_CODEGEN"],
99        },
100        android_x86_64: {
101            cflags: ["-DFORCE_X86_64_CODEGEN"],
102        },
103        arm_on_x86: {
104            cflags: [
105                "-DPROVIDE_ARM_CODEGEN",
106                "-DFORCE_BUILD_ARM",
107            ],
108        },
109        arm_on_x86_64: {
110            cflags: [
111                "-DPROVIDE_ARM_CODEGEN",
112                "-DFORCE_BUILD_ARM",
113                "-DPROVIDE_ARM64_CODEGEN",
114            ],
115        },
116    },
117}
118
119subdirs = [
120    "bcinfo",
121    "lib",
122    "tools",
123]
124