• 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
18build = ["gen.bp"]
19
20genrule {
21    name: "ltp_linux_syscall_numbers",
22    tool_files: ["testcases/kernel/include/regen.sh"],
23    cmd: "$(location) $(genDir)/linux_syscall_numbers.h",
24    srcs: ["testcases/kernel/include/*.in"],
25    out: ["linux_syscall_numbers.h"],
26}
27
28cc_defaults {
29    name: "ltp_defaults",
30
31    cflags: [
32        // Hacks for bionic compatibility
33        "-include bionic-compat.h",
34
35        // Silence noisy warnings
36        "-Wno-deprecated",
37        "-Wno-format",
38        "-Wno-gnu-designator",
39        "-Wno-macro-redefined",
40        "-Wno-missing-field-initializers",
41        "-Wno-parentheses-equality",
42        "-Wno-pointer-arith",
43        "-Wno-sign-compare",
44        "-Wno-unused-parameter",
45    ],
46
47    local_include_dirs: [
48        "android/include",
49        "include",
50    ],
51
52    // TODO: enable LTP for mips
53    arch: {
54        mips: {
55            enabled: false,
56        },
57    },
58
59    target: {
60        // bionic has broken signal handling for signum > 32 on 32-bit ARM and x86
61        // (for ABI reasons this can't be fixed)
62        android_arm: {
63            cflags: ["-DNUMSIGS=32"],
64        },
65        android_x86: {
66            cflags: ["-DNUMSIGS=32"],
67        },
68    },
69
70    generated_headers: ["ltp_linux_syscall_numbers"],
71
72    static_libs: ["libcap"],
73
74    // TODO: recover libaio when the external project created
75    shared_libs: ["libselinux"],
76}
77
78cc_defaults {
79    name: "ltp_test_defaults",
80    defaults: ["ltp_defaults"],
81    gtest: false,
82    no_named_install_directory: true,
83    relative_install_path: "ltp/testcases/bin",
84}
85