Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 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 | |
Cody Schuffelen | c775e3b | 2019-07-11 16:55:42 -0700 | [diff] [blame] | 16 | cc_library { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 17 | name: "libcuttlefish_fs", |
| 18 | srcs: [ |
Cody Schuffelen | 88370b6 | 2019-08-02 17:49:28 -0700 | [diff] [blame] | 19 | "shared_buf.cc", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 20 | "shared_fd.cpp", |
Cody Schuffelen | 9c061b0 | 2019-12-03 12:21:42 -0800 | [diff] [blame] | 21 | "tee.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 22 | ], |
Cody Schuffelen | c775e3b | 2019-07-11 16:55:42 -0700 | [diff] [blame] | 23 | shared: { |
| 24 | shared_libs: [ |
Cody Schuffelen | c775e3b | 2019-07-11 16:55:42 -0700 | [diff] [blame] | 25 | "libbase", |
| 26 | "liblog", |
| 27 | ], |
| 28 | }, |
| 29 | static: { |
| 30 | static_libs: [ |
Cody Schuffelen | c775e3b | 2019-07-11 16:55:42 -0700 | [diff] [blame] | 31 | "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 Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 42 | defaults: ["cuttlefish_host_and_guest"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 43 | } |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 44 | |
| 45 | cc_library_static { |
Cody Schuffelen | c775e3b | 2019-07-11 16:55:42 -0700 | [diff] [blame] | 46 | name: "libcuttlefish_fs_product", |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 47 | srcs: [ |
Cody Schuffelen | 88370b6 | 2019-08-02 17:49:28 -0700 | [diff] [blame] | 48 | "shared_buf.cc", |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 49 | "shared_fd.cpp", |
Cody Schuffelen | 9c061b0 | 2019-12-03 12:21:42 -0800 | [diff] [blame] | 50 | "tee.cpp", |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 51 | ], |
| 52 | shared_libs: [ |
| 53 | "libbase", |
| 54 | "liblog", |
| 55 | ], |
| 56 | stl: "libc++_static", |
| 57 | defaults: ["cuttlefish_guest_product_only"], |
| 58 | } |
Cody Schuffelen | fc56e84 | 2019-08-30 18:31:08 -0700 | [diff] [blame] | 59 | |
| 60 | cc_test_host { |
| 61 | name: "libcuttlefish_fs_tests", |
| 62 | srcs: [ |
| 63 | "shared_fd_test.cpp", |
| 64 | ], |
| 65 | header_libs: ["cuttlefish_glog"], |
| 66 | shared_libs: [ |
Cody Schuffelen | fc56e84 | 2019-08-30 18:31:08 -0700 | [diff] [blame] | 67 | "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 | } |