Skip to content

Commit 4713ad8

Browse files
vriesdavidmalcolm
authored andcommitted
gcc-with-cpychecker: Add --cpychecker-verbose
In "libcpychecker: Switch off verify_refcounting for gcc-7 and later", we added a warning in gcc-with-cpychecker when refcounting verification has been disabled. This warning causes configure tests of gdb to fail when building using {CC,CXX}=gcc-with-cpychecker. Fix this by switching the warning off by default, and adding an option --cpychecker-verbose to switch it on. [ An alternative could be to change the syntax from: gcc-with-cpychecker [options] gcc-options to: gcc-with-cpychecker [options --] gcc-options and use: gcc-with-cpychecker --verbose -- instead of: gcc-with-cpychecker --cpychecker-verbose ]
1 parent 10a2212 commit 4713ad8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gcc-with-cpychecker

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ parser.add_argument('--dump-json',
5757
' "foo.c.bar.json" will be written out in JSON'
5858
' form'))
5959

60+
parser.add_argument('--cpychecker-verbose',
61+
action='store_true',
62+
default=False,
63+
help=('Output extra information'))
64+
6065
# Only consume args we understand, leaving the rest for gcc:
6166
ns, other_args = parser.parse_known_args()
6267
if 0:
@@ -70,7 +75,7 @@ if 0:
7075
# but unfortunately gcc's option parser seems to not be able to cope with '='
7176
# within an option's value. So we do it using dictionary syntax instead:
7277
dictstr = '"verify_refcounting":True'
73-
dictstr += ', "verbose":True'
78+
dictstr += ', "verbose":%i' % (ns.cpychecker_verbose)
7479
dictstr += ', "maxtrans":%i' % ns.maxtrans
7580
dictstr += ', "dump_json":%i' % ns.dump_json
7681
cmd = 'from libcpychecker import main; main(**{%s})' % dictstr

0 commit comments

Comments
 (0)