load("//cuttlefish/bazel:rules.bzl", "cf_cc_library", "cf_cc_test") package( default_visibility = ["//:android_cuttlefish"], ) cf_cc_library( name = "architecture", srcs = ["architecture.cpp"], hdrs = ["architecture.h"], deps = [ "//libbase", ], ) cf_cc_library( name = "archive", srcs = ["archive.cpp"], hdrs = ["archive.h"], deps = [ "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:subprocess", "//cuttlefish/common/libs/utils:subprocess_managed_stdio", "//libbase", ], ) cf_cc_library( name = "base64", srcs = ["base64.cpp"], hdrs = ["base64.h"], deps = ["@boringssl//:crypto"], ) cf_cc_test( name = "base64_test", srcs = ["base64_test.cpp"], deps = [ "//cuttlefish/common/libs/utils:base64", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "cf_endian", hdrs = ["cf_endian.h"], deps = [ "//libbase", ], ) cf_cc_library( name = "container", srcs = ["container.cpp"], hdrs = ["container.h"], deps = ["//cuttlefish/common/libs/utils:files"], ) cf_cc_library( name = "contains", hdrs = ["contains.h"], ) cf_cc_library( name = "device_type", srcs = ["device_type.cpp"], hdrs = ["device_type.h"], ) cf_cc_library( name = "disk_usage", srcs = ["disk_usage.cpp"], hdrs = ["disk_usage.h"], deps = [ "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:subprocess", "//cuttlefish/common/libs/utils:subprocess_managed_stdio", "//libbase", ], ) cf_cc_library( name = "environment", srcs = [ "environment.cpp", "known_paths.cpp", ], hdrs = [ "environment.h", "known_paths.h", ], deps = [ "//libbase", ], ) cf_cc_library( name = "files", srcs = ["files.cpp"], hdrs = ["files.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:in_sandbox", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:users", "//libbase", ], ) cf_cc_library( name = "files_test_helper", testonly = 1, srcs = ["files_test_helper.cpp"], hdrs = ["files_test_helper.h"], deps = [ "//cuttlefish/common/libs/utils:files", "@googletest//:gtest", ], ) cf_cc_test( name = "files_test", srcs = ["files_test.cpp"], deps = [ "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:files_test_helper", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:result_matchers", "//libbase", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "flag_parser", srcs = ["flag_parser.cpp"], hdrs = ["flag_parser.h"], deps = [ "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:tee_logging", "//libbase", "@fmt", ], ) cf_cc_test( name = "flag_parser_test", srcs = ["flag_parser_test.cpp"], # `layering_check` conflicts with the combination of the clang prebuilt and # the cmake build rules used for @libxml2. features = ["-layering_check"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:flag_parser", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:result_matchers", "//libbase", "@googletest//:gtest", "@googletest//:gtest_main", "@libxml2", ], ) cf_cc_library( name = "flags_validator", srcs = ["flags_validator.cpp"], hdrs = ["flags_validator.h"], deps = [ "//cuttlefish/common/libs/utils:result", ], ) cf_cc_library( name = "in_sandbox", srcs = ["in_sandbox.cpp"], hdrs = ["in_sandbox.h"], ) cf_cc_library( name = "inotify", srcs = ["inotify.cpp"], hdrs = ["inotify.h"], deps = ["//libbase"], ) cf_cc_library( name = "json", srcs = ["json.cpp"], hdrs = ["json.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:result", "@jsoncpp", ], ) cf_cc_library( name = "network", srcs = ["network.cpp"], hdrs = ["network.h"], deps = [ "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:subprocess", "//cuttlefish/common/libs/utils:subprocess_managed_stdio", "//libbase", "@fmt", ], ) cf_cc_test( name = "network_test", srcs = ["network_test.cpp"], deps = [ ":network", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "proc_file_utils", srcs = ["proc_file_utils.cpp"], hdrs = ["proc_file_utils.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:result", "//libbase", "@fmt", ], ) cf_cc_test( name = "proc_file_utils_test", srcs = ["proc_file_utils_test.cpp"], deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:proc_file_utils", "//cuttlefish/common/libs/utils:result", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "proto", hdrs = ["proto.h"], deps = [ "@fmt", "@protobuf", "@protobuf//:json_util", ], ) cf_cc_library( name = "result", srcs = [ "result.cpp", ], hdrs = [ "result.h", ], deps = [ "//libbase", "@fmt", ], ) cf_cc_test( name = "result_test", srcs = [ "result_test.cpp", ], deps = [ ":result", ":result_matchers", "//libbase", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "result_matchers", testonly = 1, hdrs = [ "result_matchers.h", ], deps = [ ":result", "//libbase", "@googletest//:gtest", ], ) cf_cc_library( name = "shared_fd_flag", srcs = ["shared_fd_flag.cpp"], hdrs = ["shared_fd_flag.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:flag_parser", "//libbase", ], ) cf_cc_library( name = "signals", srcs = ["signals.cpp"], hdrs = ["signals.h"], deps = ["//libbase"], ) cf_cc_library( name = "size_utils", hdrs = ["size_utils.h"], ) cf_cc_library( name = "socket2socket_proxy", srcs = ["socket2socket_proxy.cpp"], hdrs = ["socket2socket_proxy.h"], deps = [ "//cuttlefish/common/libs/fs", "//libbase", ], ) cf_cc_library( name = "subprocess", srcs = ["subprocess.cpp"], hdrs = ["subprocess.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:result", "//libbase", ], ) cf_cc_library( name = "subprocess_managed_stdio", srcs = ["subprocess_managed_stdio.cc"], hdrs = ["subprocess_managed_stdio.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:subprocess", "//libbase", ], ) cf_cc_library( name = "tcp_socket", srcs = ["tcp_socket.cpp"], hdrs = ["tcp_socket.h"], deps = [ "//cuttlefish/common/libs/fs", "//libbase", ], ) cf_cc_library( name = "tee_logging", srcs = ["tee_logging.cpp"], hdrs = ["tee_logging.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:environment", "//cuttlefish/common/libs/utils:result", "//libbase", ], ) cf_cc_library( name = "type_name", hdrs = ["type_name.h"], ) cf_cc_library( name = "unique_resource_allocator", hdrs = ["unique_resource_allocator.h"], deps = [ "//cuttlefish/common/libs/utils:contains", "//libbase", ], ) cf_cc_test( name = "unique_resource_allocator_test", srcs = ["unique_resource_allocator_test.cpp"], deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:unique_resource_allocator", "//libbase", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "unix_sockets", srcs = ["unix_sockets.cpp"], hdrs = ["unix_sockets.h"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:result", "//libbase", ], ) cf_cc_test( name = "unix_sockets_test", srcs = ["unix_sockets_test.cpp"], deps = [ "//cuttlefish/common/libs/fs", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:unix_sockets", "//libbase", "@googletest//:gtest", "@googletest//:gtest_main", ], ) cf_cc_library( name = "users", srcs = ["users.cpp"], hdrs = ["users.h"], deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:result", "//libbase", ], ) cf_cc_library( name = "vsock_connection", srcs = ["vsock_connection.cpp"], hdrs = ["vsock_connection.h"], clang_tidy_enabled = False, # TODO: b/403278821 - fix warnings and re-enable after migration work deps = [ "//cuttlefish/common/libs/fs", "//libbase", "@jsoncpp", ], ) cf_cc_library( name = "wait_for_file", srcs = ["wait_for_file.cc"], hdrs = ["wait_for_file.h"], deps = [ "//cuttlefish/common/libs/utils:contains", "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:inotify", "//cuttlefish/common/libs/utils:result", "//libbase", ], ) cf_cc_library( name = "wait_for_unix_socket", srcs = ["wait_for_unix_socket.cpp"], hdrs = ["wait_for_unix_socket.h"], deps = [ "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:result", "//cuttlefish/common/libs/utils:subprocess", "//cuttlefish/common/libs/utils:subprocess_managed_stdio", "//cuttlefish/common/libs/utils:wait_for_file", ], )