• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2019 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    // See: http://go/android-license-faq
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_library_shared {
23    name: "libfuse_jni",
24
25    srcs: [
26        "jni_init.cpp",
27        "com_android_providers_media_FuseDaemon.cpp",
28        "FuseDaemon.cpp",
29        "FuseUtils.cpp",
30        "MediaProviderWrapper.cpp",
31        "ReaddirHelper.cpp",
32        "RedactionInfo.cpp",
33        "node.cpp"
34    ],
35
36    header_libs: [
37        "bpf_syscall_wrappers",
38        "libnativehelper_header_only",
39    ],
40
41    export_include_dirs: ["include"],
42
43    shared_libs: [
44        "leveldb",
45        "liblog",
46        "libfuse",
47        "libandroid"
48    ],
49
50    static_libs: [
51        "libbase_ndk",
52    ],
53
54    cflags: [
55        "-Wall",
56        "-Werror",
57        "-Wno-unused-parameter",
58        "-Wno-unused-variable",
59        "-Wthread-safety",
60
61        "-D_FILE_OFFSET_BITS=64",
62        "-DFUSE_USE_VERSION=34",
63    ],
64
65    tidy: true,
66    tidy_checks: [
67        "-google-runtime-int",
68        "-performance-no-int-to-ptr",
69    ],
70
71    sdk_version: "current",
72    stl: "c++_static",
73    min_sdk_version: "30",
74}
75
76cc_test {
77    name: "fuse_node_test",
78    test_suites: ["device-tests", "mts-mediaprovider"],
79    test_config: "fuse_node_test.xml",
80
81    compile_multilib: "both",
82    multilib: {
83        lib32: { suffix: "32", },
84        lib64: { suffix: "64", },
85    },
86
87    srcs: [
88        "node_test.cpp",
89        "node.cpp",
90        "ReaddirHelper.cpp",
91        "RedactionInfo.cpp",
92    ],
93
94    local_include_dirs: ["include"],
95
96    static_libs: [
97        "libbase_ndk",
98    ],
99
100    shared_libs: [
101        "liblog",
102    ],
103
104    tidy: true,
105    tidy_checks: [
106        "-performance-no-int-to-ptr",
107    ],
108
109    sdk_version: "current",
110    stl: "c++_static",
111}
112
113cc_test {
114    name: "RedactionInfoTest",
115    test_suites: ["device-tests", "mts-mediaprovider"],
116    test_config: "RedactionInfoTest.xml",
117
118    compile_multilib: "both",
119    multilib: {
120        lib32: { suffix: "32", },
121        lib64: { suffix: "64", },
122    },
123
124    srcs: [
125        "RedactionInfoTest.cpp",
126        "RedactionInfo.cpp",
127    ],
128
129    local_include_dirs: ["include"],
130
131    static_libs: [
132        "libbase_ndk",
133    ],
134
135    shared_libs: [
136        "liblog",
137    ],
138
139    tidy: true,
140
141    sdk_version: "current",
142    stl: "c++_static",
143}
144
145cc_test {
146    name: "FuseUtilsTest",
147    test_suites: ["device-tests", "mts-mediaprovider"],
148    test_config: "FuseUtilsTest.xml",
149
150    compile_multilib: "both",
151    multilib: {
152        lib32: { suffix: "32", },
153        lib64: { suffix: "64", },
154    },
155
156    srcs: [
157        "FuseUtilsTest.cpp",
158        "FuseUtils.cpp",
159    ],
160
161    header_libs: [
162        "libnativehelper_header_only",
163    ],
164
165    local_include_dirs: ["include"],
166
167    static_libs: [
168        "libbase_ndk",
169    ],
170
171    shared_libs: [
172        "liblog",
173    ],
174
175    tidy: true,
176
177    sdk_version: "current",
178    stl: "c++_static",
179}
180