From 17459ca0c71cbf9deb73a7e3ddcce5812a216a26 Mon Sep 17 00:00:00 2001 From: Chad Reynolds Date: Tue, 27 Oct 2026 16:12:34 -0700 Subject: [PATCH] Split `environment` and `known_paths` targets Bug: 578649943 --- base/cvd/cuttlefish/common/libs/fs/BUILD.bazel | 2 +- base/cvd/cuttlefish/common/libs/utils/BUILD.bazel | 15 +++++++++++++-- .../host/commands/assemble_cvd/BUILD.bazel | 6 +++--- .../host/commands/host_bugreport/BUILD.bazel | 1 + .../host/commands/run_cvd/launch/BUILD.bazel | 2 +- .../cuttlefish/host/libs/vm_manager/BUILD.bazel | 1 + base/cvd/libext4_utils/BUILD.bazel | 3 +-- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel b/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel index 247795fe01e..a0b77e40e10 100644 --- a/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel +++ b/base/cvd/cuttlefish/common/libs/fs/BUILD.bazel @@ -27,7 +27,7 @@ cf_cc_library( include_cleaner_enabled = False, deps = [ "//cuttlefish/common/libs/fs:scoped_mmap", - "//cuttlefish/common/libs/utils:environment", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/io", "//cuttlefish/posix:strerror", "//cuttlefish/posix:temp_failure_retry", diff --git a/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel b/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel index c6a2bff3ec7..78ccb2de717 100644 --- a/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel +++ b/base/cvd/cuttlefish/common/libs/utils/BUILD.bazel @@ -94,11 +94,9 @@ cf_cc_library( name = "environment", srcs = [ "environment.cpp", - "known_paths.cpp", ], hdrs = [ "environment.h", - "known_paths.h", ], ) @@ -239,6 +237,19 @@ cf_cc_library( ], ) +cf_cc_library( + name = "known_paths", + srcs = [ + "known_paths.cpp", + ], + hdrs = [ + "known_paths.h", + ], + deps = [ + "//cuttlefish/common/libs/utils:environment", + ], +) + cf_cc_library( name = "network", srcs = ["network.cpp"], diff --git a/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel b/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel index ecf00f1ffb6..3523399a45a 100644 --- a/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/assemble_cvd/BUILD.bazel @@ -27,9 +27,9 @@ cf_cc_binary( deps = [ "//cuttlefish/common/libs/fs:fd", "//cuttlefish/common/libs/utils:contains", - "//cuttlefish/common/libs/utils:environment", "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:in_sandbox", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/common/libs/utils:tee_logging", "//cuttlefish/files:directory_contents", "//cuttlefish/files:directory_exists", @@ -330,9 +330,9 @@ cf_cc_library( "//cuttlefish/common/libs/utils:base64", "//cuttlefish/common/libs/utils:container", "//cuttlefish/common/libs/utils:contains", - "//cuttlefish/common/libs/utils:environment", "//cuttlefish/common/libs/utils:files", "//cuttlefish/common/libs/utils:host_info", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/common/libs/utils:network", "//cuttlefish/files:directory_exists", "//cuttlefish/files:file_exists", @@ -664,7 +664,7 @@ cf_cc_library( srcs = ["assemble_cvd_flags.cpp"], hdrs = ["assemble_cvd_flags.h"], deps = [ - "//cuttlefish/common/libs/utils:environment", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/host/commands/assemble_cvd:flags_defaults", "//cuttlefish/host/libs/config:display", "@fmt", diff --git a/base/cvd/cuttlefish/host/commands/host_bugreport/BUILD.bazel b/base/cvd/cuttlefish/host/commands/host_bugreport/BUILD.bazel index 5876a042168..536f653f026 100644 --- a/base/cvd/cuttlefish/host/commands/host_bugreport/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/host_bugreport/BUILD.bazel @@ -12,6 +12,7 @@ cf_cc_binary( deps = [ "//cuttlefish/common/libs/utils:environment", "//cuttlefish/common/libs/utils:files", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/common/libs/utils:tee_logging", "//cuttlefish/files:directory_contents", "//cuttlefish/files:directory_exists", diff --git a/base/cvd/cuttlefish/host/commands/run_cvd/launch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/run_cvd/launch/BUILD.bazel index 6dad647f911..2dbee4c58ae 100644 --- a/base/cvd/cuttlefish/host/commands/run_cvd/launch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/run_cvd/launch/BUILD.bazel @@ -560,7 +560,7 @@ cf_cc_library( srcs = ["vhost_device_vsock.cpp"], hdrs = ["vhost_device_vsock.h"], deps = [ - "//cuttlefish/common/libs/utils:environment", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/common/libs/utils:wait_for_unix_socket", "//cuttlefish/host/commands/run_cvd/launch:log_tee_creator", "//cuttlefish/host/libs/config:config_utils", diff --git a/base/cvd/cuttlefish/host/libs/vm_manager/BUILD.bazel b/base/cvd/cuttlefish/host/libs/vm_manager/BUILD.bazel index 9767ebe9f9e..88bf49b1eab 100644 --- a/base/cvd/cuttlefish/host/libs/vm_manager/BUILD.bazel +++ b/base/cvd/cuttlefish/host/libs/vm_manager/BUILD.bazel @@ -42,6 +42,7 @@ cf_cc_library( "//cuttlefish/common/libs/utils:host_info", "//cuttlefish/common/libs/utils:in_sandbox", "//cuttlefish/common/libs/utils:json", + "//cuttlefish/common/libs/utils:known_paths", "//cuttlefish/common/libs/utils:network", "//cuttlefish/common/libs/utils:users", "//cuttlefish/common/libs/utils:wait_for_unix_socket", diff --git a/base/cvd/libext4_utils/BUILD.bazel b/base/cvd/libext4_utils/BUILD.bazel index ef472128c81..60e2db6cbad 100644 --- a/base/cvd/libext4_utils/BUILD.bazel +++ b/base/cvd/libext4_utils/BUILD.bazel @@ -1,5 +1,4 @@ load("@rules_cc//cc:cc_library.bzl", "cc_library") - load("//:build_variables.bzl", "COPTS") package( @@ -28,8 +27,8 @@ cc_library( copts = COPTS + [ "-Wno-module-import-in-extern-c", ], - strip_include_prefix = "include", features = ["-parse_headers"], + strip_include_prefix = "include", ) exports_files([