File tree 2 files changed +16
-19
lines changed
2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -906,21 +906,10 @@ where
906
906
let mut language: Option < String > =
907
907
language_to_arg ( parsed_args. language ) . map ( |lang| lang. into ( ) ) ;
908
908
if !rewrite_includes_only {
909
- if let CCompilerKind :: Nvhpc = kind {
910
- // -x=c|cpp|c++|i|cpp-output|asm|assembler|ASM|assembler-with-cpp|none
911
- // Specify the language for any following input files, instead of letting
912
- // the compiler choose based on suffix. Turn off with -x none
913
- match parsed_args. language {
914
- Language :: C | Language :: Cxx => language = Some ( "cpp-output" . into ( ) ) ,
915
- Language :: GenericHeader | Language :: CHeader | Language :: CxxHeader => { }
916
- _ => * ( language. as_mut ( ) ?) = "none" . into ( ) ,
917
- }
918
- } else {
919
- match parsed_args. language {
920
- Language :: C => language = Some ( "cpp-output" . into ( ) ) ,
921
- Language :: GenericHeader | Language :: CHeader | Language :: CxxHeader => { }
922
- _ => language. as_mut ( ) ?. push_str ( "-cpp-output" ) ,
923
- }
909
+ match parsed_args. language {
910
+ Language :: C => language = Some ( "cpp-output" . into ( ) ) ,
911
+ Language :: GenericHeader | Language :: CHeader | Language :: CxxHeader => { }
912
+ _ => language. as_mut ( ) ?. push_str ( "-cpp-output" ) ,
924
913
}
925
914
}
926
915
Original file line number Diff line number Diff line change @@ -972,7 +972,7 @@ where
972
972
let includes_prefix = includes_prefix. to_string ( ) ;
973
973
let cwd = cwd. to_owned ( ) ;
974
974
975
- let mut output = run_input_output ( cmd, None ) . await ?;
975
+ let output = run_input_output ( cmd, None ) . await ?;
976
976
977
977
if !is_clang {
978
978
return Ok ( output) ;
@@ -990,8 +990,13 @@ where
990
990
encode_path ( & mut f, & parsed_args. input )
991
991
. with_context ( || format ! ( "Couldn't encode input filename: '{:?}'" , objfile) ) ?;
992
992
write ! ( f, " " ) ?;
993
+ let process:: Output {
994
+ status,
995
+ stdout,
996
+ stderr : stderr_bytes,
997
+ } = output;
993
998
let stderr =
994
- from_local_codepage ( & output . stderr ) . context ( "Failed to convert preprocessor stderr" ) ?;
999
+ from_local_codepage ( & stderr_bytes ) . context ( "Failed to convert preprocessor stderr" ) ?;
995
1000
let mut deps = HashSet :: new ( ) ;
996
1001
let mut stderr_bytes = vec ! [ ] ;
997
1002
for line in stderr. lines ( ) {
@@ -1021,8 +1026,11 @@ where
1021
1026
writeln ! ( f, "{}:" , dep) ?;
1022
1027
}
1023
1028
}
1024
- output. stderr = stderr_bytes;
1025
- Ok ( output)
1029
+ Ok ( process:: Output {
1030
+ status,
1031
+ stdout,
1032
+ stderr : stderr_bytes,
1033
+ } )
1026
1034
} else {
1027
1035
Ok ( output)
1028
1036
}
You can’t perform that action at this time.
0 commit comments