File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
3
3
fn main ( ) {
4
+ let is_custom_os = || env:: var ( "CARGO_CFG_TARGET_OS" ) . as_deref ( ) == Ok ( "custom" ) ;
5
+
4
6
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
5
7
let target = env:: var ( "TARGET" ) . expect ( "TARGET was not set" ) ;
6
8
if target. contains ( "freebsd" ) {
@@ -37,6 +39,7 @@ fn main() {
37
39
|| target. contains ( "nintendo-3ds" )
38
40
|| target. contains ( "vita" )
39
41
|| target. contains ( "nto" )
42
+ || is_custom_os ( )
40
43
// See src/bootstrap/synthetic_targets.rs
41
44
|| env:: var ( "RUSTC_BOOTSTRAP_SYNTHETIC_TARGET" ) . is_ok ( )
42
45
{
Original file line number Diff line number Diff line change @@ -926,6 +926,7 @@ pub mod consts {
926
926
/// - dragonfly
927
927
/// - netbsd
928
928
/// - openbsd
929
+ /// - custom
929
930
/// - solaris
930
931
/// - android
931
932
/// - windows
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ cfg_if::cfg_if! {
44
44
45
45
cfg_if:: cfg_if! {
46
46
if #[ cfg( any( target_os = "l4re" ,
47
+ target_os = "custom" ,
47
48
feature = "restricted-std" ,
48
49
all( target_family = "wasm" , not( target_os = "emscripten" ) ) ,
49
50
all( target_vendor = "fortanix" , target_env = "sgx" ) ) ) ] {
You can’t perform that action at this time.
0 commit comments