compilers: detect: fix comment/error string in _get_gnu_compiler_defines

Make the debug & error message strings consistent between the GCC and Clang probes.

Copy-paste error. Here, we're scraping pre-processor tokens, not checking
for the compiler type.
pull/13289/head
Sam James 5 months ago
parent 4cebb77e1e
commit b56a3198b4
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
  1. 4
      mesonbuild/compilers/detect.py

@ -1331,7 +1331,7 @@ def detect_masm_compiler(env: 'Environment', for_machine: MachineChoice) -> Comp
def _get_gnu_compiler_defines(compiler: T.List[str]) -> T.Dict[str, str]:
"""
Detect GNU compiler platform type (Apple, MinGW, Unix)
Get the list of GCC pre-processor defines
"""
# Arguments to output compiler pre-processor defines to stdout
# gcc, g++, and gfortran all support these arguments
@ -1339,7 +1339,7 @@ def _get_gnu_compiler_defines(compiler: T.List[str]) -> T.Dict[str, str]:
mlog.debug(f'Running command: {join_args(args)}')
p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
if p.returncode != 0:
raise EnvironmentException('Unable to detect GNU compiler type:\n'
raise EnvironmentException('Unable to detect gcc pre-processor defines:\n'
f'Compiler stdout:\n{output}\n-----\n'
f'Compiler stderr:\n{error}\n-----\n')
# Parse several lines of the type:

Loading…
Cancel
Save