Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libscanbuild/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@ def parser_add_compilers(parser):
dest='cxx',
default=os.getenv('CXX', 'c++'),
help="""This is the same as "--use-cc" but for C++ code.""")
parser.add_argument(
'--intercept-lib-cc',
metavar="<path>",
dest='libear_cc',
help="""The compiler for building interception library, defaulted to
the value of "--use-cc"."""
)


class AppendCommaSeparated(argparse.Action):
Expand Down
3 changes: 2 additions & 1 deletion libscanbuild/intercept.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def setup_environment(args, destination):
'CXX': COMPILER_WRAPPER_CXX,
})
else:
intercept_library = build_libear(args.cc, destination)
libear_cc = args.libear_cc if 'libear_cc' in args else args.cc
intercept_library = build_libear(libear_cc, destination)
if sys.platform == 'darwin':
environment.update({
'DYLD_INSERT_LIBRARIES': intercept_library,
Expand Down