libcxx: Enhance lit test command in verbose mode.
Print both the compiler command and linker command so that it will be easier for developers to reproduce the failed test cases. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@237530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b6d12a2b3a
commit
21f5b24e2d
@ -107,12 +107,15 @@ class CXXCompiler(object):
|
|||||||
# Otherwise wrap the filename in a context manager function.
|
# Otherwise wrap the filename in a context manager function.
|
||||||
with_fn = lambda: libcxx.util.nullContext(object_file)
|
with_fn = lambda: libcxx.util.nullContext(object_file)
|
||||||
with with_fn() as object_file:
|
with with_fn() as object_file:
|
||||||
cmd, output, err, rc = self.compile(source_file, object_file,
|
cc_cmd, cc_stdout, cc_stderr, rc = self.compile(
|
||||||
flags=flags, env=env, cwd=cwd)
|
source_file, object_file, flags=flags, env=env, cwd=cwd)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
return cmd, output, err, rc
|
return cc_cmd, cc_stdout, cc_stderr, rc
|
||||||
return self.link(object_file, out=out, flags=flags, env=env,
|
|
||||||
cwd=cwd)
|
link_cmd, link_stdout, link_stderr, rc = self.link(
|
||||||
|
object_file, out=out, flags=flags, env=env, cwd=cwd)
|
||||||
|
return (cc_cmd + ['&&'] + link_cmd, cc_stdout + link_stdout,
|
||||||
|
cc_stderr + link_stderr, rc)
|
||||||
|
|
||||||
def dumpMacros(self, source_files=None, flags=[], env=None, cwd=None):
|
def dumpMacros(self, source_files=None, flags=[], env=None, cwd=None):
|
||||||
if source_files is None:
|
if source_files is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user