mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge pull request #46088 from ClickHouse/rs/fix-liburing-build
Fix build with `-DENABLE_LIBURING=0` (or `-DENABLE_LIBRARIES=0`)
This commit is contained in:
commit
690d873126
@ -29,6 +29,7 @@
|
||||
#cmakedefine01 USE_FASTOPS
|
||||
#cmakedefine01 USE_NLP
|
||||
#cmakedefine01 USE_VECTORSCAN
|
||||
#cmakedefine01 USE_LIBURING
|
||||
#cmakedefine01 USE_AVRO
|
||||
#cmakedefine01 USE_CAPNP
|
||||
#cmakedefine01 USE_PARQUET
|
||||
|
@ -1,6 +1,7 @@
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
#include "IOUringReader.h"
|
||||
|
||||
#if USE_LIBURING
|
||||
|
||||
#include <base/errnoToString.h>
|
||||
#include <Common/assert_cast.h>
|
||||
#include <Common/Exception.h>
|
||||
|
@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if USE_LIBURING
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <IO/AsynchronousReader.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <Disks/IO/ThreadPoolReader.h>
|
||||
#include <IO/SynchronousReader.h>
|
||||
#include <Common/ProfileEvents.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
namespace ProfileEvents
|
||||
{
|
||||
@ -84,7 +84,7 @@ std::unique_ptr<ReadBufferFromFileBase> createReadBufferFromFileBase(
|
||||
}
|
||||
else if (settings.local_fs_method == LocalFSReadMethod::io_uring)
|
||||
{
|
||||
#if defined(OS_LINUX)
|
||||
#if USE_LIBURING
|
||||
static std::shared_ptr<IOUringReader> reader = std::make_shared<IOUringReader>(512);
|
||||
if (!reader->isSupported())
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "io_uring is not supported by this system");
|
||||
|
@ -51,6 +51,7 @@ const char * auto_config_build[]
|
||||
"USE_ROCKSDB", "@USE_ROCKSDB@",
|
||||
"USE_NURAFT", "@USE_NURAFT@",
|
||||
"USE_NLP", "@USE_NLP@",
|
||||
"USE_LIBURING", "@USE_LIBURING@",
|
||||
"USE_SQLITE", "@USE_SQLITE@",
|
||||
"USE_LIBPQXX", "@USE_LIBPQXX@",
|
||||
"USE_AZURE_BLOB_STORAGE", "@USE_AZURE_BLOB_STORAGE@",
|
||||
|
@ -129,6 +129,9 @@ if (TARGET ch_contrib::parquet)
|
||||
set(USE_ARROW 1)
|
||||
set(USE_ORC 1)
|
||||
endif()
|
||||
if (TARGET ch_contrib::liburing)
|
||||
set(USE_LIBURING 1)
|
||||
endif ()
|
||||
if (TARGET ch_contrib::protobuf)
|
||||
set(USE_PROTOBUF 1)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user