File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,8 @@ enum ErrorKind {
351
351
ToolFamilyMacroNotFound ,
352
352
/// Invalid target.
353
353
InvalidTarget ,
354
+ /// Unknown target.
355
+ UnknownTarget ,
354
356
/// Invalid rustc flag.
355
357
InvalidFlag ,
356
358
#[ cfg( feature = "parallel" ) ]
@@ -3979,7 +3981,7 @@ impl Default for Build {
3979
3981
}
3980
3982
3981
3983
fn fail ( s : & str ) -> ! {
3982
- eprintln ! ( "\n \n error occurred: {}\n \n " , s) ;
3984
+ eprintln ! ( "\n \n error occurred in cc-rs : {}\n \n " , s) ;
3983
3985
std:: process:: exit ( 1 ) ;
3984
3986
}
3985
3987
Original file line number Diff line number Diff line change @@ -59,8 +59,20 @@ impl FromStr for TargetInfo<'_> {
59
59
Ok ( info. clone ( ) )
60
60
} else {
61
61
Err ( Error :: new (
62
- ErrorKind :: InvalidTarget ,
63
- format ! ( "unknown target `{target_triple}`" ) ,
62
+ ErrorKind :: UnknownTarget ,
63
+ format ! (
64
+ "unknown target `{target_triple}`.
65
+
66
+ NOTE: `cc-rs` only supports a fixed set of targets when not in a build script.
67
+ - If adding a new target, you will need to fork of `cc-rs` until the target
68
+ has landed on nightly and the auto-generated list has been updated. See also
69
+ the `rustc` dev guide on adding a new target:
70
+ https://rustc-dev-guide.rust-lang.org/building/new-target.html
71
+ - If using a custom target, prefer to upstream it to `rustc` if possible,
72
+ otherwise open an issue with `cc-rs`:
73
+ https://github.com/rust-lang/cc-rs/issues/new
74
+ "
75
+ ) ,
64
76
) )
65
77
}
66
78
}
You can’t perform that action at this time.
0 commit comments