1// 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 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_library { 21 name: "libcuttlefish_fs", 22 srcs: [ 23 "epoll.cpp", 24 "shared_buf.cc", 25 "shared_fd.cpp", 26 "shared_fd_stream.cpp", 27 ], 28 shared: { 29 shared_libs: [ 30 "libbase", 31 "liblog", 32 ], 33 }, 34 static: { 35 static_libs: [ 36 "libbase", 37 "liblog", 38 ], 39 }, 40 target: { 41 vendor: { 42 // Liblog does not have a vendor-static variant. 43 shared_libs: ["liblog"], 44 exclude_static_libs: ["liblog"], 45 }, 46 }, 47 defaults: ["cuttlefish_host"], 48} 49 50cc_library_static { 51 name: "libcuttlefish_fs_product", 52 srcs: [ 53 "epoll.cpp", 54 "shared_buf.cc", 55 "shared_fd.cpp", 56 "shared_fd_stream.cpp", 57 ], 58 shared_libs: [ 59 "libbase", 60 "liblog", 61 ], 62 stl: "libc++_static", 63 defaults: ["cuttlefish_guest_product_only"], 64} 65 66cc_test { 67 name: "libcuttlefish_fs_tests", 68 srcs: [ 69 "shared_fd_test.cpp", 70 ], 71 shared_libs: [ 72 "libcuttlefish_fs", 73 "libbase", 74 ], 75 static_libs: [ 76 "libgmock", 77 "libgtest", 78 ], 79 defaults: ["cuttlefish_host"], 80 test_suites: ["general-tests"], 81} 82