cxx_under_test = lit.params.get('cxx_under_test', None)
if cxx_under_test is None:
cxx_under_test = getattr(config, 'cxx_under_test', None)
- if cxx_under_test is None:
- lit.fatal('must specify user parameter cxx_under_test '
- '(e.g., --param=cxx_under_test=clang++)')
+
+ # If no specific cxx_under_test was given, attempt to infer it as clang++.
+ clangxx = lit.util.which('clang++', config.environment['PATH'])
+ if clangxx is not None:
+ cxx_under_test = clangxx
+ lit.note("inferred cxx_under_test as: %r" % (cxx_under_test,))
+if cxx_under_test is None:
+ lit.fatal('must specify user parameter cxx_under_test '
+ '(e.g., --param=cxx_under_test=clang++)')
libcxx_src_root = lit.params.get('libcxx_src_root', None)
if libcxx_src_root is None:
else:
# Default to testing against the locally built libc++ library.
use_system_lib = False
+ lit.note("inferred use_system_lib as: %r" % (use_system_lib,))
# Configure extra compiler flags.
include_paths = ['-I' + libcxx_src_root + '/include', '-I' + libcxx_src_root + '/test/support']
if config.target_triple is None:
config.target_triple = lit.util.capture(
[cxx_under_test, '-dumpmachine']).strip()
- lit.note("inferred target triple as: %r" % (config.target_triple,))
+ lit.note("inferred target_triple as: %r" % (config.target_triple,))
# Write an "available feature" that combines the triple when use_system_lib is
# enabled. This is so that we can easily write XFAIL markers for tests that are