• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
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
18// *** 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
66build = ["gen.bp"]
67
68genrule {
69    name: "ltp_syscalls_h",
70    tool_files: [
71        "include/lapi/syscalls/regen.sh",
72        "include/lapi/syscalls/*.in",
73    ],
74    cmd: "$(location) $(genDir)/lapi/syscalls.h",
75    out: ["lapi/syscalls.h"],
76}
77
78cc_defaults {
79    name: "ltp_defaults",
80
81    cflags: [
82        // Hacks for bionic compatibility
83        "-include bionic-compat.h",
84
85        "-Wall",
86        "-Werror",
87        // These warnings should be checked and fixed upstream
88        "-Wno-absolute-value",
89        "-Wno-uninitialized",
90        "-Wno-user-defined-warnings",
91        // Silence noisy warnings
92        "-Wno-constant-conversion",
93        "-Wno-deprecated",
94        "-Wno-duplicate-decl-specifier",
95        "-Wno-empty-body",
96        "-Wno-format",
97        "-Wno-gnu-designator",
98        "-Wno-implicit-function-declaration",
99        "-Wno-incompatible-pointer-types-discards-qualifiers",
100        "-Wno-knr-promoted-parameter",
101        "-Wno-macro-redefined",
102        "-Wno-missing-braces",
103        "-Wno-missing-field-initializers",
104        "-Wno-parentheses-equality",
105        "-Wno-pointer-arith",
106        "-Wno-pointer-sign",
107        "-Wno-sign-compare",
108        "-Wno-tautological-compare",
109        "-Wno-unneeded-internal-declaration",
110        "-Wno-unreachable-code-loop-increment",
111        "-Wno-unused-function",
112        "-Wno-unused-parameter",
113        "-Wno-unused-variable",
114    ],
115
116    local_include_dirs: [
117        "android/include",
118        "include",
119    ],
120
121    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
132    generated_headers: ["ltp_syscalls_h"],
133
134    static_libs: ["libcap"],
135
136    // TODO: recover libaio when the external project created
137    shared_libs: ["libselinux", "libasyncio"],
138}
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}
147