Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: fix release build when enable PCH #8959

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/protobuf-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ set(libprotoc_files

add_library(libprotoc ${libprotoc_files})
target_link_libraries(libprotoc libprotobuf)
target_compile_options(libprotoc PRIVATE "-Wno-deprecated-pragma")
# target_compile_options(libprotoc PRIVATE "-Wno-deprecated-pragma")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang13 does not support this flag.

add_library(protobuf::libprotoc ALIAS libprotoc)

set(protoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc)
Expand Down
4 changes: 3 additions & 1 deletion dbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ add_headers_and_sources(tiflash_common_io src/IO)
add_headers_and_sources(tiflash_common_io src/IO/BaseFile)
add_headers_and_sources(tiflash_common_io src/IO/Buffer)
add_headers_and_sources(tiflash_common_io src/IO/Checksum)
add_headers_and_sources(tiflash_common_io src/IO/Compression)

add_headers_and_sources(dbms src/Analyzers)
add_headers_and_sources(dbms src/Core)
Expand All @@ -77,6 +76,9 @@ add_headers_and_sources(dbms src/Dictionaries)
# Encryption needs to link tiflash-proxy, but we do not want to link tiflash-proxy to tiflash_common_io.
# So we put the encryption source files in dbms.
add_headers_and_sources(dbms src/IO/Encryption)
# Some source files under src/IO/Compression need to use specific cxx flags.
# In order to enable PCH for tiflash_common_io, so we put it in dbms as well.
add_headers_and_sources(dbms src/IO/Compression)
# FileProvider relies on Encryption, so we put it in dbms as well.
add_headers_and_sources(dbms src/IO/FileProvider)
add_headers_and_sources(dbms src/Interpreters)
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/IO/Compression/CompressionCodecDelta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <common/likely.h>
#include <common/unaligned.h>

#if defined(__x86_64__) && defined(__AVX2__)
#if defined(__AVX2__)
#include <immintrin.h>
#endif

Expand Down Expand Up @@ -97,7 +97,7 @@ void decompressData(const char * source, UInt32 source_size, char * dest, UInt32
ordinaryDecompressData<T>(source, source_size, dest, output_size);
}

#if defined(__x86_64__) && defined(__AVX2__)
#if defined(__AVX2__)
// Note: using SIMD to rewrite compress does not improve performance.

template <>
Expand Down