• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "external_minijail_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["external_minijail_license"],
22}
23
24python_binary_host {
25    name: "minijail_compile_seccomp_policy",
26    main: "compile_seccomp_policy.py",
27    srcs: [
28        "arch.py",
29        "bpf.py",
30        "compile_seccomp_policy.py",
31        "compiler.py",
32        "parser.py",
33    ],
34}
35
36python_test_host {
37    name: "minijail_parser_unittest",
38    main: "parser_unittest.py",
39    srcs: [
40        "arch.py",
41        "bpf.py",
42        "parser.py",
43        "parser_unittest.py",
44    ],
45    data: [
46        "testdata/arch_64.json",
47    ],
48}
49
50python_test_host {
51    name: "minijail_compiler_unittest",
52    main: "compiler_unittest.py",
53    srcs: [
54        "arch.py",
55        "bpf.py",
56        "compiler.py",
57        "compiler_unittest.py",
58        "parser.py",
59    ],
60    data: [
61        "testdata/arch_64.json",
62    ],
63}
64
65python_binary_host {
66    name: "minijail_generate_constants_json",
67    main: "generate_constants_json.py",
68    srcs: [
69        "generate_constants_json.py",
70    ],
71}
72
73
74cc_genrule {
75    name: "minijail_constants_json",
76    host_supported: true,
77    vendor_available: true,
78    recovery_available: true,
79    tools: ["minijail_generate_constants_json"],
80    cmd: "$(location minijail_generate_constants_json) --output=$(out) $(in)",
81    srcs: [
82        ":libminijail_gen_constants_llvmir",
83        ":libminijail_gen_syscall_llvmir",
84    ],
85    out: ["constants.json"],
86}
87