|
11 | 11 |
|
12 | 12 | //@ ignore-cross-compile |
13 | 13 |
|
14 | | -use run_make_support::{rustc, dynamic_lib, tmp_dir}; |
| 14 | +use run_make_support::{dynamic_lib, rustc, tmp_dir}; |
15 | 15 | use std::fs; |
16 | 16 |
|
17 | 17 | fn main() { |
18 | 18 | let mut tmp_dir_other = tmp_dir(); |
19 | 19 | tmp_dir_other.push("other"); |
20 | 20 |
|
21 | 21 | fs::create_dir(tmp_dir_other.clone()); |
22 | | - rustc().input("foo.rs") |
23 | | - .crate_type("dylib") |
24 | | - .codegen_option("prefer-dynamic") |
25 | | - .run(); |
| 22 | + rustc().input("foo.rs").crate_type("dylib").codegen_option("prefer-dynamic").run(); |
26 | 23 | fs::rename(dynamic_lib("foo"), tmp_dir_other.clone()); |
27 | | - rustc().input("foo.rs") |
28 | | - .crate_type("dylib") |
29 | | - .codegen_option("prefer-dynamic") |
30 | | - .run(); |
31 | | - rustc().input("bar.rs") |
32 | | - .library_search_path(tmp_dir_other.clone()) |
33 | | - .run(); |
| 24 | + rustc().input("foo.rs").crate_type("dylib").codegen_option("prefer-dynamic").run(); |
| 25 | + rustc().input("bar.rs").library_search_path(tmp_dir_other.clone()).run(); |
34 | 26 | fs::remove_dir_all(tmp_dir()); |
35 | 27 |
|
36 | 28 | fs::create_dir_all(tmp_dir_other.clone()); |
37 | | - rustc().input("foo.rs") |
38 | | - .crate_type("rlib") |
39 | | - .run(); |
| 29 | + rustc().input("foo.rs").crate_type("rlib").run(); |
40 | 30 | let mut tmp_dir_libfoo = tmp_dir(); |
41 | 31 | tmp_dir_libfoo.push("libfoo.rlib"); |
42 | 32 | fs::rename(tmp_dir_libfoo, tmp_dir_other.clone()); |
43 | | - rustc().input("foo.rs") |
44 | | - .crate_type("rlib") |
45 | | - .run(); |
46 | | - rustc().input("bar.rs") |
47 | | - .library_search_path(tmp_dir_other.clone()) |
48 | | - .run(); |
| 33 | + rustc().input("foo.rs").crate_type("rlib").run(); |
| 34 | + rustc().input("bar.rs").library_search_path(tmp_dir_other.clone()).run(); |
49 | 35 | } |
0 commit comments