File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ cargo_binutils:: Tool :: As . rust_exec ( )
3
+ }
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
340
340
341
341
match tool {
342
342
// Tools that don't need a build
343
- Tool :: Ar | Tool :: Cov | Tool :: Lld | Tool :: Profdata => { }
343
+ Tool :: Ar | Tool :: As | Tool :: Cov | Tool :: Lld | Tool :: Profdata => { }
344
344
// for some tools we change the CWD (current working directory) and
345
345
// make the artifact path relative. This makes the path that the
346
346
// tool will print easier to read. e.g. `libfoo.rlib` instead of
@@ -371,9 +371,13 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
371
371
372
372
// post process output
373
373
let processed_output = match tool {
374
- Tool :: Ar | Tool :: Cov | Tool :: Lld | Tool :: Objcopy | Tool :: Profdata | Tool :: Strip => {
375
- output. stdout . into ( )
376
- }
374
+ Tool :: Ar
375
+ | Tool :: As
376
+ | Tool :: Cov
377
+ | Tool :: Lld
378
+ | Tool :: Objcopy
379
+ | Tool :: Profdata
380
+ | Tool :: Strip => output. stdout . into ( ) ,
377
381
Tool :: Nm | Tool :: Objdump | Tool :: Readobj => postprocess:: demangle ( & output. stdout ) ,
378
382
Tool :: Size => postprocess:: size ( & output. stdout ) ,
379
383
} ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use crate::rustc::rustlib;
10
10
#[ derive( Clone , Copy , PartialEq , Eq ) ]
11
11
pub enum Tool {
12
12
Ar ,
13
+ As ,
13
14
Cov ,
14
15
Lld ,
15
16
Nm ,
@@ -25,6 +26,7 @@ impl Tool {
25
26
pub fn name ( self ) -> & ' static str {
26
27
match self {
27
28
Tool :: Ar => "ar" ,
29
+ Tool :: As => "as" ,
28
30
Tool :: Cov => "cov" ,
29
31
Tool :: Lld => "lld" ,
30
32
Tool :: Nm => "nm" ,
@@ -102,7 +104,7 @@ impl Tool {
102
104
// Whether this tool requires the project to be previously built
103
105
pub fn needs_build ( self ) -> bool {
104
106
match self {
105
- Tool :: Ar | Tool :: Cov | Tool :: Lld | Tool :: Profdata => false ,
107
+ Tool :: Ar | Tool :: As | Tool :: Cov | Tool :: Lld | Tool :: Profdata => false ,
106
108
Tool :: Nm | Tool :: Objcopy | Tool :: Objdump | Tool :: Readobj | Tool :: Size | Tool :: Strip => {
107
109
true
108
110
}
You can’t perform that action at this time.
0 commit comments