Skip to content

Commit

Permalink
compilers: detect: fix comment/error string in _get_gnu_compiler_defines
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thesamesam committed Jun 23, 2024
1 parent 4cebb77 commit b56a319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesonbuild/compilers/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,15 +1331,15 @@ 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
args = compiler + ['-E', '-dM', '-']
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:
Expand Down

0 comments on commit b56a319

Please sign in to comment.