Fix build for all targets

This commit is contained in:
Ivan Lezhankin 2019-09-20 20:34:59 +03:00 committed by Ivan Lezhankin
parent 967e00a8da
commit 8cb0e58bc7
5 changed files with 15 additions and 12 deletions

View File

@ -33,9 +33,11 @@ endif ()
clickhouse_program_add_library(odbc-bridge)
# clickhouse-odbc-bridge is always a separate binary.
# Reason: it must not export symbols from SSL, mariadb-client, etc. to not break ABI compatibility with ODBC drivers.
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-export-dynamic")
if (OS_LINUX)
# clickhouse-odbc-bridge is always a separate binary.
# Reason: it must not export symbols from SSL, mariadb-client, etc. to not break ABI compatibility with ODBC drivers.
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-export-dynamic")
endif ()
add_executable(clickhouse-odbc-bridge odbc-bridge.cpp)
set_target_properties(clickhouse-odbc-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)

View File

@ -12,11 +12,11 @@ NO_INLINE const void * getAddress()
return __builtin_return_address(0);
}
using namespace DB;
int main(int argc, char ** argv)
{
#ifdef __ELF__
using namespace DB;
if (argc < 2)
{
std::cerr << "Usage: ./symbol_index address\n";

View File

@ -18,7 +18,7 @@
#include <Common/HashTable/HashMap.h>
#include <Interpreters/AggregationCommon.h>
#ifdef __SSE4_1__
#ifdef __SSE4_2__
#include <smmintrin.h>
#endif
@ -164,7 +164,7 @@ struct FNV1a
};
#ifdef __SSE4_1__
#ifdef __SSE4_2__
struct CrapWow
{
@ -254,7 +254,7 @@ struct SimpleHash
if (size < 8)
{
#ifdef __SSE4_1__
#ifdef __SSE4_2__
return hashLessThan8(x.data, x.size);
#endif
}
@ -291,7 +291,7 @@ struct VerySimpleHash
if (size < 8)
{
#ifdef __SSE4_1__
#ifdef __SSE4_2__
return hashLessThan8(x.data, x.size);
#endif
}
@ -342,7 +342,7 @@ struct SMetroHash64
};
#ifdef __SSE4_1__
#ifdef __SSE4_2__
/*struct CRC32Hash
{
@ -499,7 +499,7 @@ int main(int argc, char ** argv)
if (!m || m == 3) bench<StringRef, SimpleHash> (data, "StringRef_SimpleHash");
if (!m || m == 4) bench<StringRef, FNV1a> (data, "StringRef_FNV1a");
#ifdef __SSE4_1__
#ifdef __SSE4_2__
if (!m || m == 5) bench<StringRef, CrapWow> (data, "StringRef_CrapWow");
if (!m || m == 6) bench<StringRef, CRC32Hash> (data, "StringRef_CRC32Hash");
if (!m || m == 7) bench<StringRef, CRC32ILPHash> (data, "StringRef_CRC32ILPHash");

View File

@ -1,2 +1,3 @@
add_executable (zookeeper-adjust-block-numbers-to-parts main.cpp ${SRCS})
target_compile_options(zookeeper-adjust-block-numbers-to-parts PRIVATE -Wno-format)
target_link_libraries (zookeeper-adjust-block-numbers-to-parts PRIVATE dbms clickhouse_common_zookeeper ${Boost_PROGRAM_OPTIONS_LIBRARY})

View File

@ -179,7 +179,7 @@ void setCurrentBlockNumber(zkutil::ZooKeeper & zk, const std::string & path, Int
if (number != current_block_number)
{
char suffix[11] = "";
sprintf(suffix, "%010ld", current_block_number);
sprintf(suffix, "%010lld", current_block_number);
std::string expected_path = block_prefix + suffix;
std::cerr << "\t" << path_created << ": Ephemeral node has been created with an unexpected path (expected something like "
<< expected_path << ")." << std::endl;