pass compiler defines such as __FLT_MIN__ to smatch and sparse (they fail without them).

This commit is contained in:
Campbell Barton
2013-08-08 01:53:02 +00:00
parent 26c0839220
commit 7cb1415530
3 changed files with 26 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
def main():
source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
source_defines = project_source_info.build_defines_as_args()
check_commands = []
for c, inc_dirs, defs in source_info:
@@ -50,7 +51,8 @@ def main():
CHECKER_ARGS +
[c] +
[("-I%s" % i) for i in inc_dirs] +
[("-D%s" % d) for d in defs]
[("-D%s" % d) for d in defs] +
source_defines
)
check_commands.append((c, cmd))