File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 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 @@ -355,7 +355,7 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
355
355
356
356
match tool {
357
357
// Tools that don't need a build
358
- Tool :: Ar | Tool :: Cov | Tool :: Lld | Tool :: Profdata => { }
358
+ Tool :: Ar | Tool :: As | Tool :: Cov | Tool :: Lld | Tool :: Profdata => { }
359
359
// for some tools we change the CWD (current working directory) and
360
360
// make the artifact path relative. This makes the path that the
361
361
// tool will print easier to read. e.g. `libfoo.rlib` instead of
@@ -386,9 +386,13 @@ pub fn run(tool: Tool, matches: ArgMatches) -> Result<i32> {
386
386
387
387
// post process output
388
388
let processed_output = match tool {
389
- Tool :: Ar | Tool :: Cov | Tool :: Lld | Tool :: Objcopy | Tool :: Profdata | Tool :: Strip => {
390
- output. stdout . into ( )
391
- }
389
+ Tool :: Ar
390
+ | Tool :: As
391
+ | Tool :: Cov
392
+ | Tool :: Lld
393
+ | Tool :: Objcopy
394
+ | Tool :: Profdata
395
+ | Tool :: Strip => output. stdout . into ( ) ,
392
396
Tool :: Nm | Tool :: Objdump | Tool :: Readobj => postprocess:: demangle ( & output. stdout ) ,
393
397
Tool :: Size => postprocess:: size ( & output. stdout ) ,
394
398
} ;
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