Skip to content

Commit

Permalink
only pass -x flag if language is known
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrupp committed Nov 12, 2023
1 parent a0128a4 commit 083aa69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analyzer/codechecker_analyzer/buildlog/log_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,11 @@ def get_compiler_includes(compiler, language, compiler_flags):
language -- The programming language being compiled (e.g. 'c' or 'c++')
compiler_flags -- the flags used for compilation
"""
cmd = [compiler, *compiler_flags, '-E', '-x', language, '-', '-v']
#cmd = [compiler, *compiler_flags, '-E', '-x', language, '-', '-v']
cmd = [compiler, *compiler_flags, '-E',
*(['-x', language] if language else []),
'-', '-v']


# TODO: shlex.join(cmd) would be more elegant after upgrading to
# Python 3.8.
Expand Down

0 comments on commit 083aa69

Please sign in to comment.