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 "shared_buf.cc", 24 "shared_fd.cpp", 25 "shared_fd_stream.cpp", 26 ], 27 shared_libs: [ 28 "libbase", 29 "libcuttlefish_utils_environment", 30 "libcuttlefish_utils_result", 31 "liblog", 32 ], 33 target: { 34 android: { 35 shared_libs: [ 36 "libbase", 37 "liblog", 38 ], 39 }, 40 darwin: { 41 enabled: true, 42 }, 43 host: { 44 shared: { 45 shared_libs: [ 46 "libbase", 47 "liblog", 48 ], 49 }, 50 static: { 51 static_libs: [ 52 "libbase", 53 "liblog", 54 ], 55 }, 56 }, 57 linux: { 58 srcs: [ 59 "epoll.cpp", 60 ], 61 }, 62 }, 63 defaults: ["cuttlefish_host"], 64 product_available: true, 65} 66 67cc_test { 68 name: "libcuttlefish_fs_tests", 69 srcs: [ 70 "shared_fd_test.cpp", 71 ], 72 shared_libs: [ 73 "libbase", 74 "libcuttlefish_fs", 75 ], 76 static_libs: [ 77 "libgmock", 78 "libgtest", 79 ], 80 defaults: ["cuttlefish_host"], 81 test_suites: ["general-tests"], 82} 83