提交 3873ab1a 编写于 作者: A Alexey Milovidov

Fixed tests in Sandbox [#CLICKHOUSE-2]

上级 86f44238
add_definitions("-fno-sanitize=all")
if (USE_EMBEDDED_COMPILER)
add_subdirectory ("Compiler-${LLVM_VERSION}")
endif ()
......
......@@ -280,7 +280,18 @@ void Compiler::compile(
}
if (!compile_result.empty())
throw Exception("Cannot compile code:\n\n" + command.str() + "\n\n" + compile_result);
{
std::string error_message = "Cannot compile code:\n\n" + command.str() + "\n\n" + compile_result;
Poco::File so_tmp_file(so_tmp_file_path);
if (so_tmp_file.exists() && so_tmp_file.canExecute())
{
/// Compiler may emit information messages. This is suspicious, but we still can use compiled result.
LOG_WARNING(log, error_message);
}
else
throw Exception(error_message, ErrorCodes::CANNOT_COMPILE_CODE);
}
/// If there was an error before, the file with the code remains for viewing.
Poco::File(cpp_file_path).remove();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册