mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
feat(build-dir): Added build-directory
to cargo metadata output
This commit is contained in:
parent
155aaae22e
commit
54e5369584
@ -52,6 +52,11 @@ pub fn output_metadata(ws: &Workspace<'_>, opt: &OutputMetadataOptions) -> Cargo
|
||||
.collect(),
|
||||
resolve,
|
||||
target_directory: ws.target_dir().into_path_unlocked(),
|
||||
build_directory: ws
|
||||
.gctx()
|
||||
.cli_unstable()
|
||||
.build_dir
|
||||
.then(|| ws.build_dir().into_path_unlocked()),
|
||||
version: VERSION,
|
||||
workspace_root: ws.root().to_path_buf(),
|
||||
metadata: ws.custom_metadata().cloned(),
|
||||
@ -68,6 +73,8 @@ pub struct ExportInfo {
|
||||
workspace_default_members: Vec<PackageIdSpec>,
|
||||
resolve: Option<MetadataResolve>,
|
||||
target_directory: PathBuf,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
build_directory: Option<PathBuf>,
|
||||
version: u32,
|
||||
workspace_root: PathBuf,
|
||||
metadata: Option<toml::Value>,
|
||||
|
@ -4312,6 +4312,7 @@ fn build_dir() {
|
||||
.with_stdout_data(
|
||||
str![[r#"
|
||||
{
|
||||
"build_directory": "[ROOT]/foo/build-dir",
|
||||
"metadata": null,
|
||||
"packages": "{...}",
|
||||
"resolve": "{...}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user