Skip to content

Commit 8fc0581

Browse files
committed
bootstrap: -Zjson-target-spec for synthetic targets
1 parent 3a933e5 commit 8fc0581

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ impl Cargo {
122122
cmd_kind: Kind,
123123
) -> Cargo {
124124
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
125+
if target.synthetic {
126+
cargo.arg("-Zjson-target-spec");
127+
}
125128

126129
match cmd_kind {
127130
// No need to configure the target linker for these command types.
@@ -165,7 +168,11 @@ impl Cargo {
165168
target: TargetSelection,
166169
cmd_kind: Kind,
167170
) -> Cargo {
168-
builder.cargo(compiler, mode, source_type, target, cmd_kind)
171+
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
172+
if target.synthetic {
173+
cargo.arg("-Zjson-target-spec");
174+
}
175+
cargo
169176
}
170177

171178
pub fn rustdocflag(&mut self, arg: &str) -> &mut Cargo {

0 commit comments

Comments
 (0)