6
6
mod command;
7
7
mod macros;
8
8
9
+ pub mod ar;
9
10
pub mod diff;
10
11
pub mod env_checked;
11
12
pub mod external_deps;
@@ -40,7 +41,13 @@ pub use python::python_command;
40
41
pub use rustc:: { aux_build, bare_rustc, rustc, Rustc } ;
41
42
pub use rustdoc:: { bare_rustdoc, rustdoc, Rustdoc } ;
42
43
43
- /// [`diff`] is implemented in terms of the [similar] library.
44
+ /// [`ar`][mod@ar] currently uses the [ar][rust-ar] rust library, but that is subject to changes, we
45
+ /// may switch to `llvm-ar` subject to experimentation.
46
+ ///
47
+ /// [rust-ar]: https://github.com/mdsteele/rust-ar
48
+ pub use ar:: ar;
49
+
50
+ /// [`diff`][mod@diff] is implemented in terms of the [similar] library.
44
51
///
45
52
/// [similar]: https://github.com/mitsuhiko/similar
46
53
pub use diff:: { diff, Diff } ;
@@ -56,19 +63,6 @@ pub use targets::{is_darwin, is_msvc, is_windows, target, uname};
56
63
57
64
use command:: { Command , CompletedProcess } ;
58
65
59
- /// `AR`
60
- #[ track_caller]
61
- pub fn ar ( inputs : & [ impl AsRef < Path > ] , output_path : impl AsRef < Path > ) {
62
- let output = fs:: File :: create ( & output_path) . expect ( & format ! (
63
- "the file in path \" {}\" could not be created" ,
64
- output_path. as_ref( ) . display( )
65
- ) ) ;
66
- let mut builder = ar:: Builder :: new ( output) ;
67
- for input in inputs {
68
- builder. append_path ( input) . unwrap ( ) ;
69
- }
70
- }
71
-
72
66
/// Returns the path for a local test file.
73
67
pub fn path < P : AsRef < Path > > ( p : P ) -> PathBuf {
74
68
cwd ( ) . join ( p. as_ref ( ) )
0 commit comments