blob: 0e49e5a831908407de1f51cd64f6296cfbcc3ca0 [file] [log] [blame]
Greg Hartmana4ff2482017-10-03 16:35:00 -07001//
2// Copyright (C) 2017 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
Cody Schuffelenc775e3b2019-07-11 16:55:42 -070016cc_library {
Greg Hartmana4ff2482017-10-03 16:35:00 -070017 name: "libcuttlefish_fs",
18 srcs: [
Cody Schuffelen88370b62019-08-02 17:49:28 -070019 "shared_buf.cc",
Greg Hartmana4ff2482017-10-03 16:35:00 -070020 "shared_fd.cpp",
Cody Schuffelen9c061b02019-12-03 12:21:42 -080021 "tee.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070022 ],
Cody Schuffelenc775e3b2019-07-11 16:55:42 -070023 shared: {
24 shared_libs: [
Cody Schuffelenc775e3b2019-07-11 16:55:42 -070025 "libbase",
26 "liblog",
27 ],
28 },
29 static: {
30 static_libs: [
Cody Schuffelenc775e3b2019-07-11 16:55:42 -070031 "libbase",
32 "liblog",
33 ],
34 },
35 target: {
36 vendor: {
37 // Liblog does not have a vendor-static variant.
38 shared_libs: ["liblog"],
39 exclude_static_libs: ["liblog"],
40 },
41 },
Greg Hartmance872ef2017-12-04 22:51:47 -080042 defaults: ["cuttlefish_host_and_guest"],
Greg Hartmana4ff2482017-10-03 16:35:00 -070043}
Ram Muthiah792e2ad2019-04-19 11:19:46 -070044
45cc_library_static {
Cody Schuffelenc775e3b2019-07-11 16:55:42 -070046 name: "libcuttlefish_fs_product",
Ram Muthiah792e2ad2019-04-19 11:19:46 -070047 srcs: [
Cody Schuffelen88370b62019-08-02 17:49:28 -070048 "shared_buf.cc",
Ram Muthiah792e2ad2019-04-19 11:19:46 -070049 "shared_fd.cpp",
Cody Schuffelen9c061b02019-12-03 12:21:42 -080050 "tee.cpp",
Ram Muthiah792e2ad2019-04-19 11:19:46 -070051 ],
52 shared_libs: [
53 "libbase",
54 "liblog",
55 ],
56 stl: "libc++_static",
57 defaults: ["cuttlefish_guest_product_only"],
58}
Cody Schuffelenfc56e842019-08-30 18:31:08 -070059
60cc_test_host {
61 name: "libcuttlefish_fs_tests",
62 srcs: [
63 "shared_fd_test.cpp",
64 ],
65 header_libs: ["cuttlefish_glog"],
66 shared_libs: [
Cody Schuffelenfc56e842019-08-30 18:31:08 -070067 "libcuttlefish_fs",
68 "libbase",
69 ],
70 static_libs: [
71 "libgmock",
72 "libgtest_host",
73 ],
74 defaults: ["cuttlefish_host_only"],
75 test_suites: ["general-tests"],
76}