File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ path = "main.rs"
11
11
unstable-features = [] # for rust-analyzer
12
12
13
13
# Do not add any dependencies
14
- [dependencies ]
14
+ [target . 'cfg(target_os = "linux")' . dependencies ]
15
15
landlock = " 0.4"
16
16
17
17
[profile .dev ]
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ mod bench;
12
12
mod build_backend;
13
13
mod build_sysroot;
14
14
mod config;
15
+ #[ cfg( target_os = "linux" ) ]
15
16
mod landlock;
16
17
mod path;
17
18
mod prepare;
@@ -143,6 +144,7 @@ fn main() {
143
144
144
145
path:: RelPath :: DOWNLOAD . ensure_exists ( & dirs) ;
145
146
147
+ #[ cfg( target_os = "linux" ) ]
146
148
landlock:: lock_fetch ( ) ;
147
149
148
150
prepare:: prepare ( & dirs) ;
@@ -195,6 +197,7 @@ fn main() {
195
197
path:: RelPath :: BUILD . ensure_exists ( & dirs) ;
196
198
path:: RelPath :: DIST . ensure_exists ( & dirs) ;
197
199
200
+ #[ cfg( target_os = "linux" ) ]
198
201
landlock:: lock_build ( & bootstrap_host_compiler. cargo , frozen) ;
199
202
200
203
{
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ pub(crate) fn get_toolchain_name() -> String {
27
27
String :: from_utf8 ( active_toolchain) . unwrap ( ) . trim ( ) . split_once ( ' ' ) . unwrap ( ) . 0 . to_owned ( )
28
28
}
29
29
30
+ #[ cfg( target_os = "linux" ) ]
30
31
pub ( crate ) fn get_cargo_home ( cargo : & Path ) -> PathBuf {
31
32
let cargo_home = Command :: new ( cargo)
32
33
. stderr ( Stdio :: inherit ( ) )
You can’t perform that action at this time.
0 commit comments