We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.json
1 parent ed858da commit 703f7a7Copy full SHA for 703f7a7
src/cargo/core/compiler/build_config.rs
@@ -65,7 +65,17 @@ impl BuildConfig {
65
failure::bail!("target was empty")
66
}
67
68
- let cfg_target = config.get_string("build.target")?.map(|s| s.val);
+ let cfg_target = match config.get_string("build.target")? {
69
+ Some(ref target) if target.val.ends_with(".json") => {
70
+ let path = target.definition.root(config).join(&target.val);
71
+ let path_string = path
72
+ .into_os_string()
73
+ .into_string()
74
+ .map_err(|_| failure::format_err!("Target path is not valid unicode"));
75
+ Some(path_string?)
76
+ }
77
+ other => other.map(|t| t.val),
78
+ };
79
let target = requested_target.or(cfg_target);
80
81
if jobs == Some(0) {
0 commit comments