18
18
import re
19
19
import typing as T
20
20
21
- from .. import coredata , mlog
22
- from ..mesonlib import EnvironmentException , MesonException , Popen_safe , OptionKey , join_args
21
+ from .. import coredata
22
+ from ..mesonlib import EnvironmentException , MesonException , Popen_safe_logged , OptionKey
23
23
from .compilers import Compiler , rust_buildtype_args , clike_debug_args
24
24
25
25
if T .TYPE_CHECKING :
@@ -82,13 +82,7 @@ def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
82
82
''' ))
83
83
84
84
cmdlist = self .exelist + ['-o' , output_name , source_name ]
85
- pc , stdo , stde = Popen_safe (cmdlist , cwd = work_dir )
86
- mlog .debug ('Sanity check compiler command line:' , join_args (cmdlist ))
87
- mlog .debug ('Sanity check compile stdout:' )
88
- mlog .debug (stdo )
89
- mlog .debug ('-----\n Sanity check compile stderr:' )
90
- mlog .debug (stde )
91
- mlog .debug ('-----' )
85
+ pc , stdo , stde = Popen_safe_logged (cmdlist , cwd = work_dir )
92
86
if pc .returncode != 0 :
93
87
raise EnvironmentException (f'Rust compiler { self .name_string ()} cannot compile programs.' )
94
88
if self .is_cross :
@@ -104,7 +98,7 @@ def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
104
98
raise EnvironmentException (f'Executables created by Rust compiler { self .name_string ()} are not runnable.' )
105
99
# Get libraries needed to link with a Rust staticlib
106
100
cmdlist = self .exelist + ['--crate-type' , 'staticlib' , '--print' , 'native-static-libs' , source_name ]
107
- p , stdo , stde = Popen_safe (cmdlist , cwd = work_dir )
101
+ p , stdo , stde = Popen_safe_logged (cmdlist , cwd = work_dir )
108
102
if p .returncode == 0 :
109
103
match = re .search ('native-static-libs: (.*)$' , stde , re .MULTILINE )
110
104
if match :
@@ -123,7 +117,7 @@ def get_buildtype_args(self, buildtype: str) -> T.List[str]:
123
117
124
118
def get_sysroot (self ) -> str :
125
119
cmd = self .get_exelist (ccache = False ) + ['--print' , 'sysroot' ]
126
- p , stdo , stde = Popen_safe (cmd )
120
+ p , stdo , stde = Popen_safe_logged (cmd )
127
121
return stdo .split ('\n ' , maxsplit = 1 )[0 ]
128
122
129
123
def get_debug_args (self , is_debug : bool ) -> T .List [str ]:
0 commit comments