Closed SchrodingerZhu closed 1 year ago
Update it to be clang-15 support as 15.0.1 was released at Sep 20th
Mark: we disable clang-analyzer-cplusplus.NewDeleteLeaks
now as there is a false positive on boost::is_any_of
. We need to add it back after upgraded to clang-15
https://github.com/pingcap/tiflash/pull/5955#discussion_r975974355
I am curious of what the plan is now? Could you reveal more details?
@SchrodingerZhu I tried to build LLVM 15.0.1, but met two bugs when compiling compiler-rt
, openmp
. However, tiflash seems not depend on these two libs.
https://github.com/pingcap/tiflash/pull/5264/files#diff-7882039fe139a7dd13da211a9e31d4d4df7f3e6117f5b48032b176596246ab08R42-R43
What really block me is that I can not build tiflash-proxy with clang 15.0.1 in our server environment. Seems it is not related to clang 15.0.1, but other components make it fail on our environment. I have to resolve them before pushing this forward.
Some error related with Clang 15:
In file included from /workspace/tiflash/dbms/src/Common/tests/gtest_cpu_affinity_manager.cpp:31:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string.hpp:23:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/split.hpp:16:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/iter_find.hpp:27:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/find_iterator.hpp:24:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /workspace/tiflash/contrib/boost/boost/function.hpp:30:
In file included from /workspace/tiflash/contrib/boost/boost/function/detail/prologue.hpp:17:
In file included from /workspace/tiflash/contrib/boost/boost/function/function_base.hpp:22:
/workspace/tiflash/contrib/boost/boost/type_traits/has_trivial_copy.hpp:34:4: error: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Werror,-Wdeprecated-builtins]
BOOST_HAS_TRIVIAL_COPY(T) BOOST_TT_TRIVIAL_CONSTRUCT_FIX
^
/workspace/tiflash/contrib/boost/boost/type_traits/intrinsics.hpp:190:41: note: expanded from macro 'BOOST_HAS_TRIVIAL_COPY'
# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
^
In file included from /workspace/tiflash/dbms/src/Common/tests/gtest_cpu_affinity_manager.cpp:31:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string.hpp:23:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/split.hpp:16:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/iter_find.hpp:27:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/find_iterator.hpp:24:
In file included from /workspace/tiflash/contrib/boost/boost/algorithm/string/detail/find_iterator.hpp:18:
In file included from /workspace/tiflash/contrib/boost/boost/function.hpp:30:
In file included from /workspace/tiflash/contrib/boost/boost/function/detail/prologue.hpp:17:
In file included from /workspace/tiflash/contrib/boost/boost/function/function_base.hpp:23:
/workspace/tiflash/contrib/boost/boost/type_traits/has_trivial_destructor.hpp:30:86: error: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Werror,-Wdeprecated-builtins]
template <typename T> struct has_trivial_destructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_DESTRUCTOR(T)>{};
^
/workspace/tiflash/contrib/boost/boost/type_traits/intrinsics.hpp:196:47: note: expanded from macro 'BOOST_HAS_TRIVIAL_DESTRUCTOR'
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible<T>::value)
^
2 errors generated.
[44/223] Building CXX object dbms/CMake...ests/gtest_funtions_decimal_arith.cpp.o
ninja: build stopped: subcommand failed.
make: *** [dev] Error 1
May be better to migrate to new compiler-builtins, instead of just mute the warning I guess.
@breezewish do you mean contribute to boost?
@breezewish do you mean contribute to boost?
No, may be we could try to review whether a newer boost resolves it?
However, upgrading the boost may bring more issues. So I'm not sure about it.
Not only boost, but many other third-party libs could throw warnings under clang-15. For example, https://github.com/tikv/rocksdb/pull/315
Maybe using the target_no_warning
in cmake or a wrapper file to ignore is the easier way to fix the warnings from third-party libraries
@JaySon-Huang could target_no_warning
suppress warnings from included header files?
@breezewish Even Boost 1.80 hasn't fixed these issues.
Closed by #6936
reopen because we do not support clang 15 in CI by now https://ci.pingcap.net/blue/organizations/jenkins/tiflash-build-common/detail/tiflash-build-common/20561/pipeline
reopen because we do not support clang 15 in CI by now https://ci.pingcap.net/blue/organizations/jenkins/tiflash-build-common/detail/tiflash-build-common/20561/pipeline
Enhancement
release notes: https://releases.llvm.org/download.html
LIBCPP Highlists
New Features
Clang Highlights
clang-format
LLVM Highlights
Changes to the AArch64 Backend
Changes to the X86 Target