66mod command;
77mod macros;
88
9+ pub mod ar;
910pub mod diff;
1011pub mod env_checked;
1112pub mod external_deps;
@@ -40,7 +41,13 @@ pub use python::python_command;
4041pub use rustc:: { aux_build, bare_rustc, rustc, Rustc } ;
4142pub use rustdoc:: { bare_rustdoc, rustdoc, Rustdoc } ;
4243
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.
4451///
4552/// [similar]: https://github.com/mitsuhiko/similar
4653pub use diff:: { diff, Diff } ;
@@ -56,19 +63,6 @@ pub use targets::{is_darwin, is_msvc, is_windows, target, uname};
5663
5764use command:: { Command , CompletedProcess } ;
5865
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-
7266/// Returns the path for a local test file.
7367pub fn path < P : AsRef < Path > > ( p : P ) -> PathBuf {
7468 cwd ( ) . join ( p. as_ref ( ) )
0 commit comments