File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -483,20 +483,16 @@ winhttp = "0.4.0"
483
483
openssl = " 1.0.1"
484
484
```
485
485
486
- If you’re using a custom target specification, quote the full path and file
487
- name :
486
+ If you’re using a custom target specification (such as `--target
487
+ foo/bar.json ` ), use the base filename without the ` .json` extension :
488
488
489
489
``` toml
490
- [target ."x86_64/windows . json" .dependencies ]
490
+ [target .bar .dependencies ]
491
491
winhttp = " 0.4.0"
492
492
493
- [target ." i686/linux . json" .dependencies ]
493
+ [target .my-special- i686-platform .dependencies ]
494
494
openssl = " 1.0.1"
495
495
native = { path = " native/i686" }
496
-
497
- [target ."x86_64/linux .json" .dependencies ]
498
- openssl = " 1.0.1"
499
- native = { path = " native/x86_64" }
500
496
```
501
497
502
498
### Development dependencies
Original file line number Diff line number Diff line change @@ -114,7 +114,24 @@ fn basic() {
114
114
#[ cargo_test( build_std) ]
115
115
fn cross_custom ( ) {
116
116
let p = project ( )
117
- . file ( "src/lib.rs" , "#![no_std] pub fn f() {}" )
117
+ . file (
118
+ "Cargo.toml" ,
119
+ r#"
120
+ [package]
121
+ name = "foo"
122
+ version = "0.1.0"
123
+ edition = "2018"
124
+
125
+ [target.custom-target.dependencies]
126
+ dep = { path = "dep" }
127
+ "# ,
128
+ )
129
+ . file (
130
+ "src/lib.rs" ,
131
+ "#![no_std] pub fn f() -> u32 { dep::answer() }" ,
132
+ )
133
+ . file ( "dep/Cargo.toml" , & basic_manifest ( "dep" , "0.1.0" ) )
134
+ . file ( "dep/src/lib.rs" , "#![no_std] pub fn answer() -> u32 { 42 }" )
118
135
. file (
119
136
"custom-target.json" ,
120
137
r#"
You can’t perform that action at this time.
0 commit comments