blob: 03821b6c952a04e3a5061e82f117382633d0e20e [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
Bob Badour6e575ae2021-03-24 19:06:36 -070018// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
19// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
20// DEPENDING ON IT IN YOUR PROJECT. ***
21package {
22 default_applicable_licenses: ["external_ltp_license"],
23}
24
25// Added automatically by a large-scale-change that took the approach of
26// 'apply every license found to every target'. While this makes sure we respect
27// every license restriction, it may not be entirely correct.
28//
29// e.g. GPL in an MIT project might only apply to the contrib/ directory.
30//
31// Please consider splitting the single license below into multiple licenses,
32// taking care not to lose any license_kind information, and overriding the
33// default license using the 'licenses: [...]' property on targets as needed.
34//
35// For unused files, consider creating a 'fileGroup' with "//visibility:private"
36// to attach the license to, and including a comment whether the files may be
37// used in the current project.
38//
39// large-scale-change included anything that looked like it might be a license
40// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
41//
42// Please consider removing redundant or irrelevant files from 'license_text:'.
43// See: http://go/android-license-faq
44license {
45 name: "external_ltp_license",
46 visibility: [":__subpackages__"],
47 license_kinds: [
48 "SPDX-license-identifier-APSL-1.1",
49 "SPDX-license-identifier-Apache-2.0",
50 "SPDX-license-identifier-BSD",
51 "SPDX-license-identifier-BSD-2-Clause",
52 "SPDX-license-identifier-BSD-3-Clause",
53 "SPDX-license-identifier-GFDL", // by exception only
54 "SPDX-license-identifier-GPL",
55 "SPDX-license-identifier-GPL-2.0",
56 "SPDX-license-identifier-GPL-3.0",
57 "SPDX-license-identifier-ISC",
58 "SPDX-license-identifier-LGPL",
59 ],
60 license_text: [
61 "COPYING",
62 "NOTICE",
63 ],
64}
65
Dan Willemseneb4fafa2016-12-15 22:55:34 -080066build = ["gen.bp"]
67
68genrule {
Sandeep Patil824296b2017-10-18 20:12:37 -070069 name: "ltp_syscalls_h",
Colin Crossb5594552020-12-02 17:49:36 -080070 tool_files: [
71 "include/lapi/syscalls/regen.sh",
72 "include/lapi/syscalls/*.in",
73 ],
Sandeep Patil824296b2017-10-18 20:12:37 -070074 cmd: "$(location) $(genDir)/lapi/syscalls.h",
Sandeep Patil824296b2017-10-18 20:12:37 -070075 out: ["lapi/syscalls.h"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -080076}
77
78cc_defaults {
79 name: "ltp_defaults",
80
81 cflags: [
82 // Hacks for bionic compatibility
83 "-include bionic-compat.h",
84
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070085 "-Wall",
86 "-Werror",
Colin Crossd4f428e2019-11-01 18:31:25 -070087 // These warnings should be checked and fixed upstream
88 "-Wno-absolute-value",
89 "-Wno-uninitialized",
90 "-Wno-user-defined-warnings",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080091 // Silence noisy warnings
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070092 "-Wno-constant-conversion",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080093 "-Wno-deprecated",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -070094 "-Wno-duplicate-decl-specifier",
95 "-Wno-empty-body",
Dan Willemseneb4fafa2016-12-15 22:55:34 -080096 "-Wno-format",
97 "-Wno-gnu-designator",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -080098 "-Wno-implicit-function-declaration",
99 "-Wno-incompatible-pointer-types-discards-qualifiers",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -0700100 "-Wno-knr-promoted-parameter",
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800101 "-Wno-macro-redefined",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -0800102 "-Wno-missing-braces",
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800103 "-Wno-missing-field-initializers",
104 "-Wno-parentheses-equality",
105 "-Wno-pointer-arith",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -0700106 "-Wno-pointer-sign",
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800107 "-Wno-sign-compare",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -0700108 "-Wno-tautological-compare",
109 "-Wno-unneeded-internal-declaration",
George Burgess IV8f3ec8e2020-03-06 15:10:40 -0800110 "-Wno-unreachable-code-loop-increment",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -0700111 "-Wno-unused-function",
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800112 "-Wno-unused-parameter",
Chih-Hung Hsieh36ef68a2017-09-28 15:13:58 -0700113 "-Wno-unused-variable",
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800114 ],
115
116 local_include_dirs: [
117 "android/include",
118 "include",
119 ],
120
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800121 target: {
122 // bionic has broken signal handling for signum > 32 on 32-bit ARM and x86
123 // (for ABI reasons this can't be fixed)
124 android_arm: {
125 cflags: ["-DNUMSIGS=32"],
126 },
127 android_x86: {
128 cflags: ["-DNUMSIGS=32"],
129 },
130 },
131
Sandeep Patil824296b2017-10-18 20:12:37 -0700132 generated_headers: ["ltp_syscalls_h"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800133
134 static_libs: ["libcap"],
135
136 // TODO: recover libaio when the external project created
Jerry Zhang48d637d2018-02-12 13:23:33 -0800137 shared_libs: ["libselinux", "libasyncio"],
Dan Willemseneb4fafa2016-12-15 22:55:34 -0800138}
139
140cc_defaults {
141 name: "ltp_test_defaults",
142 defaults: ["ltp_defaults"],
143 gtest: false,
144 no_named_install_directory: true,
145 relative_install_path: "ltp/testcases/bin",
146}