diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-02-19 15:13:14 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-02-19 15:13:14 +0000 |
commit | 04a199e273a9101570341dd23e6e22ab3886774c (patch) | |
tree | bca236818aacd339cb90141722e02ac97a6bfd5b /test/lit.common.cfg | |
parent | c3cc5874235791b680461b8d8d67e504cc460e11 (diff) |
Add rudimentary support for running compiler-rt lit tests with GCC
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r-- | test/lit.common.cfg | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg index 4b198f21e..078ab684a 100644 --- a/test/lit.common.cfg +++ b/test/lit.common.cfg @@ -14,9 +14,17 @@ execute_external = (platform.system() != 'Windows' config.test_format = lit.formats.ShTest(execute_external) # Setup clang binary. -clang_path = getattr(config, 'clang', None) -if (not clang_path) or (not os.path.exists(clang_path)): - lit_config.fatal("Can't find Clang on path %r" % clang_path) +compiler_path = getattr(config, 'clang', None) +if (not compiler_path) or (not os.path.exists(compiler_path)): + lit_config.fatal("Can't find compiler on path %r" % compiler_path) + +compiler_id = getattr(config, 'compiler_id', None) +if compiler_id == "Clang": + config.cxx_mode_flags = ["--driver-mode=g++"] +elif compiler_id == 'GNU': + config.cxx_mode_flags = ["-x c++"] +else: + lit_config.fatal("Unsupported compiler id: %r" % compiler_id) # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS', |