Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 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 |
Bob Badour | 6e575ae | 2021-03-24 19:06:36 -0700 | [diff] [blame] | 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. *** |
| 21 | package { |
| 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 |
| 44 | license { |
| 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 Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 66 | build = ["gen.bp"] |
| 67 | |
| 68 | genrule { |
Sandeep Patil | 824296b | 2017-10-18 20:12:37 -0700 | [diff] [blame] | 69 | name: "ltp_syscalls_h", |
Colin Cross | b559455 | 2020-12-02 17:49:36 -0800 | [diff] [blame] | 70 | tool_files: [ |
| 71 | "include/lapi/syscalls/regen.sh", |
| 72 | "include/lapi/syscalls/*.in", |
| 73 | ], |
Sandeep Patil | 824296b | 2017-10-18 20:12:37 -0700 | [diff] [blame] | 74 | cmd: "$(location) $(genDir)/lapi/syscalls.h", |
Sandeep Patil | 824296b | 2017-10-18 20:12:37 -0700 | [diff] [blame] | 75 | out: ["lapi/syscalls.h"], |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | cc_defaults { |
| 79 | name: "ltp_defaults", |
| 80 | |
| 81 | cflags: [ |
| 82 | // Hacks for bionic compatibility |
| 83 | "-include bionic-compat.h", |
| 84 | |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 85 | "-Wall", |
| 86 | "-Werror", |
Colin Cross | d4f428e | 2019-11-01 18:31:25 -0700 | [diff] [blame] | 87 | // These warnings should be checked and fixed upstream |
| 88 | "-Wno-absolute-value", |
| 89 | "-Wno-uninitialized", |
| 90 | "-Wno-user-defined-warnings", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 91 | // Silence noisy warnings |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 92 | "-Wno-constant-conversion", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 93 | "-Wno-deprecated", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 94 | "-Wno-duplicate-decl-specifier", |
| 95 | "-Wno-empty-body", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 96 | "-Wno-format", |
| 97 | "-Wno-gnu-designator", |
George Burgess IV | 8f3ec8e | 2020-03-06 15:10:40 -0800 | [diff] [blame] | 98 | "-Wno-implicit-function-declaration", |
| 99 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 100 | "-Wno-knr-promoted-parameter", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 101 | "-Wno-macro-redefined", |
George Burgess IV | 8f3ec8e | 2020-03-06 15:10:40 -0800 | [diff] [blame] | 102 | "-Wno-missing-braces", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 103 | "-Wno-missing-field-initializers", |
| 104 | "-Wno-parentheses-equality", |
| 105 | "-Wno-pointer-arith", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 106 | "-Wno-pointer-sign", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 107 | "-Wno-sign-compare", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 108 | "-Wno-tautological-compare", |
| 109 | "-Wno-unneeded-internal-declaration", |
George Burgess IV | 8f3ec8e | 2020-03-06 15:10:40 -0800 | [diff] [blame] | 110 | "-Wno-unreachable-code-loop-increment", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 111 | "-Wno-unused-function", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 112 | "-Wno-unused-parameter", |
Chih-Hung Hsieh | 36ef68a | 2017-09-28 15:13:58 -0700 | [diff] [blame] | 113 | "-Wno-unused-variable", |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 114 | ], |
| 115 | |
| 116 | local_include_dirs: [ |
| 117 | "android/include", |
| 118 | "include", |
| 119 | ], |
| 120 | |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 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 | |
Sandeep Patil | 824296b | 2017-10-18 20:12:37 -0700 | [diff] [blame] | 132 | generated_headers: ["ltp_syscalls_h"], |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 133 | |
| 134 | static_libs: ["libcap"], |
| 135 | |
| 136 | // TODO: recover libaio when the external project created |
Jerry Zhang | 48d637d | 2018-02-12 13:23:33 -0800 | [diff] [blame] | 137 | shared_libs: ["libselinux", "libasyncio"], |
Dan Willemsen | eb4fafa | 2016-12-15 22:55:34 -0800 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | cc_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 | } |