blob: 8b7f2e75c1b38be3a075c9f040564f30e0dc4565 [file] [log] [blame]
Dan Willemseneb4fafa2016-12-15 22:55:34 -08001//
2// Copyright (C) 2016 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
17// Include the generated rules
18build = ["gen.bp"]
19
20genrule {
Sandeep Patil824296b2017-10-18 20:12:37 -070021 name: "ltp_syscalls_h",
22 tool_files: ["include/lapi/syscalls/regen.sh"],
23 cmd: "$(location) $(genDir)/lapi/syscalls.h",
24 srcs: ["include/lapi/syscalls/*.in"],
25 out: ["lapi/syscalls.h"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -080026}
27
28cc_defaults {
29 name: "ltp_defaults",
30
31 cflags: [
32 // Hacks for bionic compatibility
33 "-include bionic-compat.h",
34
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070035 "-Wall",
36 "-Werror",
Colin Crossd4f428e2019-11-01 18:31:25 -070037 // These warnings should be checked and fixed upstream
38 "-Wno-absolute-value",
39 "-Wno-uninitialized",
40 "-Wno-user-defined-warnings",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080041 // Silence noisy warnings
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070042 "-Wno-constant-conversion",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080043 "-Wno-deprecated",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070044 "-Wno-duplicate-decl-specifier",
45 "-Wno-empty-body",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080046 "-Wno-format",
47 "-Wno-gnu-designator",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -080048 "-Wno-implicit-function-declaration",
49 "-Wno-incompatible-pointer-types-discards-qualifiers",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070050 "-Wno-knr-promoted-parameter",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080051 "-Wno-macro-redefined",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -080052 "-Wno-missing-braces",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080053 "-Wno-missing-field-initializers",
54 "-Wno-parentheses-equality",
55 "-Wno-pointer-arith",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070056 "-Wno-pointer-sign",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080057 "-Wno-sign-compare",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070058 "-Wno-tautological-compare",
59 "-Wno-unneeded-internal-declaration",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -080060 "-Wno-unreachable-code-loop-increment",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070061 "-Wno-unused-function",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080062 "-Wno-unused-parameter",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070063 "-Wno-unused-variable",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080064 ],
65
66 local_include_dirs: [
67 "android/include",
68 "include",
69 ],
70
Dan Willemseneb4fafa2016-12-15 22:55:34 -080071 target: {
72 // bionic has broken signal handling for signum > 32 on 32-bit ARM and x86
73 // (for ABI reasons this can't be fixed)
74 android_arm: {
75 cflags: ["-DNUMSIGS=32"],
76 },
77 android_x86: {
78 cflags: ["-DNUMSIGS=32"],
79 },
80 },
81
Sandeep Patil824296b2017-10-18 20:12:37 -070082 generated_headers: ["ltp_syscalls_h"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -080083
84 static_libs: ["libcap"],
85
86 // TODO: recover libaio when the external project created
Jerry Zhang48d637d2018-02-12 13:23:33 -080087 shared_libs: ["libselinux", "libasyncio"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -080088}
89
90cc_defaults {
91 name: "ltp_test_defaults",
92 defaults: ["ltp_defaults"],
93 gtest: false,
94 no_named_install_directory: true,
95 relative_install_path: "ltp/testcases/bin",
96}