1// Copyright (C) 2020 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    // http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // the below license kinds from "libnativehelper_license":
19    //   SPDX-license-identifier-Apache-2.0
20    default_applicable_licenses: ["libnativehelper_license"],
21}
22
23cc_defaults {
24    name: "libnativehelper_jni_defaults",
25    cflags: [
26        "-Wall",
27        "-Werror",
28        "-Wno-unused-parameter",
29    ],
30    srcs: [
31        "jni_invocation_test.cpp",
32        "jni_helper_jni.cpp",
33        "libnativehelper_test.cpp",
34    ],
35    shared_libs: ["liblog"],
36    static_libs: ["libgmock_ndk"],
37    stl: "c++_static",
38    // libnativetesthelper_jni depends on libnativehelper_compat_libc++.
39    // At the time of writing there is no duplicated global state in the
40    // libnativehelper sources between these functions. Should this change,
41    // then there could be ODR problems here.
42    whole_static_libs: ["libnativetesthelper_jni"],
43    tidy: true,
44}
45
46cc_library_shared {
47    name: "libnativehelper_mts_jni",
48    defaults: ["libnativehelper_jni_defaults"],
49    shared_libs: ["libnativehelper"],
50}
51
52cc_library_shared {
53    name: "libnativehelper_lazy_mts_jni",
54    defaults: ["libnativehelper_jni_defaults"],
55    static_libs: ["libnativehelper_lazy"],
56}
57