feat(daemon): clean generated build outputs on request
This commit is contained in:
1 parent
7fdda96553
commit
cf06b427b7
13 files changed
+198
-25
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <filesystem>
|
||||
|
||||
namespace Void::Build::Config {
|
||||
|
||||
struct CleanReport {
|
||||
bool build_root_exists{false};
|
||||
bool removed_entire_root{false};
|
||||
std::size_t removed_paths{0};
|
||||
};
|
||||
|
||||
// Removes generated build outputs under `build_root`.
|
||||
// - all == false: removes `profiles/` and the root compile_commands.json alias, preserving the
|
||||
// shared `.vbs` cache/state.
|
||||
// - all == true: removes the entire build root.
|
||||
[[nodiscard]] Void::Result::Result<CleanReport, Void::Result::Error>
|
||||
clean_build_tree(const std::filesystem::path &build_root, bool all = false);
|
||||
|
||||
} // namespace Void::Build::Config
|
||||
Reference in new issue
Block a user