mesonbuild/meson

compiler.get_supported_arguments reports success for unsupported flags

Open

#5 355 ouverte le 3 mai 2019

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)Python (1 465 forks)batch import
bugcompilersgood first issue

Métriques du dépôt

Stars
 (4 978 stars)
Métriques de merge PR
 (Merge moyen 30j 19h) (63 PRs mergées en 30 j)

Description

The has_argument and get_supported_argument methods are reporting success when the compiler returns an unsupported flag error to stderr.

I have attached a simple test case which demonstrates the error. The relevant meson.log entry is

Running compile:
Working directory:  /tmp/tmpygkykj04
Command line:  c++ /tmp/tmpygkykj04/testfile.cpp -pipe -D_FILE_OFFSET_BITS=64 -c -o /tmp/tmpygkykj04/output.obj -O0 -fpermissive -Wdeclaration-after-statement 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 cc1plus: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++

Compiler for C++ supports arguments -Wdeclaration-after-statement: YES

meson.build.txt

Guide contributeur