зеркало из https://github.com/microsoft/clang.git
Tests: Stop looking for clang-cc, we don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91183 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
1152c39c8a
Коммит
e9c2f0fefd
32
test/lit.cfg
32
test/lit.cfg
|
@ -119,40 +119,8 @@ def inferClang(PATH):
|
|||
|
||||
return clang
|
||||
|
||||
def inferClangCC(clang, PATH):
|
||||
clangcc = os.getenv('CLANGCC')
|
||||
|
||||
# If the user set clang in the environment, definitely use that and don't
|
||||
# try to validate.
|
||||
if clangcc:
|
||||
return clangcc
|
||||
|
||||
# Otherwise try adding -cc since we expect to be looking in a build
|
||||
# directory.
|
||||
if clang.endswith('.exe'):
|
||||
clangccName = clang[:-4] + '-cc.exe'
|
||||
else:
|
||||
clangccName = clang + '-cc'
|
||||
clangcc = lit.util.which(clangccName, PATH)
|
||||
if not clangcc:
|
||||
# Otherwise ask clang.
|
||||
res = lit.util.capture([clang, '-print-prog-name=clang-cc'])
|
||||
res = res.strip()
|
||||
if res and os.path.exists(res):
|
||||
clangcc = res
|
||||
|
||||
if not clangcc:
|
||||
lit.fatal("couldn't find 'clang-cc' program, try setting "
|
||||
"CLANGCC in your environment")
|
||||
|
||||
return clangcc
|
||||
|
||||
config.clang = inferClang(config.environment['PATH'])
|
||||
if not lit.quiet:
|
||||
lit.note('using clang: %r' % config.clang)
|
||||
config.substitutions.append( (' clang ', ' ' + config.clang + ' ') )
|
||||
|
||||
config.clang_cc = inferClangCC(config.clang, config.environment['PATH'])
|
||||
if not lit.quiet:
|
||||
lit.note('using clang-cc: %r' % config.clang_cc)
|
||||
config.substitutions.append( (' clang-cc ', ' ' + config.clang + ' -cc1 ') )
|
||||
|
|
Загрузка…
Ссылка в новой задаче