Skip to content

Commit b56a319

Browse files
committed
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.
1 parent 4cebb77 commit b56a319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonbuild/compilers/detect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,15 +1331,15 @@ def detect_masm_compiler(env: 'Environment', for_machine: MachineChoice) -> Comp
13311331

13321332
def _get_gnu_compiler_defines(compiler: T.List[str]) -> T.Dict[str, str]:
13331333
"""
1334-
Detect GNU compiler platform type (Apple, MinGW, Unix)
1334+
Get the list of GCC pre-processor defines
13351335
"""
13361336
# Arguments to output compiler pre-processor defines to stdout
13371337
# gcc, g++, and gfortran all support these arguments
13381338
args = compiler + ['-E', '-dM', '-']
13391339
mlog.debug(f'Running command: {join_args(args)}')
13401340
p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
13411341
if p.returncode != 0:
1342-
raise EnvironmentException('Unable to detect GNU compiler type:\n'
1342+
raise EnvironmentException('Unable to detect gcc pre-processor defines:\n'
13431343
f'Compiler stdout:\n{output}\n-----\n'
13441344
f'Compiler stderr:\n{error}\n-----\n')
13451345
# Parse several lines of the type:

0 commit comments

Comments
 (0)