@@ -7,7 +7,6 @@ mod command;
7
7
mod macros;
8
8
mod util;
9
9
10
- pub mod ar;
11
10
pub mod artifact_names;
12
11
pub mod assertion_helpers;
13
12
pub mod diff;
@@ -28,9 +27,10 @@ pub use regex;
28
27
pub use wasmparser;
29
28
30
29
// Re-exports of external dependencies.
31
- pub use external_deps:: { cc, clang, htmldocck, llvm, python, rustc, rustdoc} ;
30
+ pub use external_deps:: { c_build , cc, clang, htmldocck, llvm, python, rustc, rustdoc} ;
32
31
33
32
// These rely on external dependencies.
33
+ pub use c_build:: build_native_static_lib;
34
34
pub use cc:: { cc, extra_c_flags, extra_cxx_flags, Cc } ;
35
35
pub use clang:: { clang, Clang } ;
36
36
pub use htmldocck:: htmldocck;
@@ -42,12 +42,6 @@ pub use python::python_command;
42
42
pub use rustc:: { aux_build, bare_rustc, rustc, Rustc } ;
43
43
pub use rustdoc:: { bare_rustdoc, rustdoc, Rustdoc } ;
44
44
45
- /// [`ar`][mod@ar] currently uses the [ar][rust-ar] rust library, but that is subject to changes, we
46
- /// may switch to `llvm-ar` subject to experimentation.
47
- ///
48
- /// [rust-ar]: https://github.com/mdsteele/rust-ar
49
- pub use ar:: ar;
50
-
51
45
/// [`diff`][mod@diff] is implemented in terms of the [similar] library.
52
46
///
53
47
/// [similar]: https://github.com/mitsuhiko/similar
@@ -82,23 +76,3 @@ pub use assertion_helpers::{
82
76
has_prefix, has_suffix, invalid_utf8_contains, invalid_utf8_not_contains, not_contains,
83
77
shallow_find_files,
84
78
} ;
85
-
86
- /// Builds a static lib (`.lib` on Windows MSVC and `.a` for the rest) with the given name.
87
- #[ track_caller]
88
- pub fn build_native_static_lib ( lib_name : & str ) -> PathBuf {
89
- let obj_file = if is_msvc ( ) { format ! ( "{lib_name}" ) } else { format ! ( "{lib_name}.o" ) } ;
90
- let src = format ! ( "{lib_name}.c" ) ;
91
- let lib_path = static_lib_name ( lib_name) ;
92
- if is_msvc ( ) {
93
- cc ( ) . arg ( "-c" ) . out_exe ( & obj_file) . input ( src) . run ( ) ;
94
- } else {
95
- cc ( ) . arg ( "-v" ) . arg ( "-c" ) . out_exe ( & obj_file) . input ( src) . run ( ) ;
96
- } ;
97
- let obj_file = if is_msvc ( ) {
98
- PathBuf :: from ( format ! ( "{lib_name}.obj" ) )
99
- } else {
100
- PathBuf :: from ( format ! ( "{lib_name}.o" ) )
101
- } ;
102
- llvm_ar ( ) . obj_to_ar ( ) . output_input ( & lib_path, & obj_file) . run ( ) ;
103
- path ( lib_path)
104
- }
0 commit comments