Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying compiler for buiding libear #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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