1//
2// Copyright (C) 2023 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
17package {
18    default_applicable_licenses: ["hardware_google_apf_license"],
19}
20
21cc_defaults {
22    name: "apfv7_defaults",
23
24    cflags: [
25        "-Wall",
26        "-Werror",
27        "-Werror=implicit-fallthrough",
28        "-Werror=missing-prototypes",
29        "-Werror=strict-prototypes",
30        "-Wnullable-to-nonnull-conversion",
31        "-Wsign-compare",
32        "-Wsign-conversion",
33        "-Wthread-safety",
34        "-Wunused-parameter",
35        "-Wuninitialized",
36    ],
37}
38
39cc_library_static {
40    name: "libapf_v7",
41    defaults: ["apfv7_defaults"],
42    srcs: [
43        "apf_interpreter.c",
44        "test_buf_allocator.c",
45    ],
46    sdk_version: "24",
47}
48
49sh_test_host {
50    name: "apf_assemble_test",
51    src: "apf_interpreter_assemble.sh",
52    filename: "apf_assemble_test.sh",
53    test_config: "apf_assemble_test.xml",
54    data: [
55        // the sources:
56        "apf_*.h",
57        "apf.h",
58        "apf_interpreter_source.c",
59        // the assembled output:
60        "apf_interpreter.c",
61    ],
62    target: {
63        darwin: {
64            enabled: false,
65        },
66        windows: {
67            enabled: false,
68        },
69    },
70    test_options: {
71        unit_test: true,
72    },
73}
74