未验证 提交 f97d5a7d 编写于 作者: E Enwei Jiao 提交者: GitHub

Fix compile failed with llvm16 (#26112)

Signed-off-by: NEnwei Jiao <enwei.jiao@zilliz.com>
上级 518b6310
......@@ -5,7 +5,7 @@ class MilvusConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = (
"rocksdb/6.29.5",
"boost/1.79.0",
"boost/1.82.0",
"onetbb/2021.7.0",
"nlohmann_json/3.11.2",
"zstd/1.5.4",
......@@ -81,13 +81,6 @@ class MilvusConan(ConanFile):
del self.options["folly"].use_sse4_2
self.options["arrow"].with_jemalloc = False
self.options["boost"].without_fiber = True
self.options["boost"].without_json = True
self.options["boost"].without_wave = True
self.options["boost"].without_math = True
self.options["boost"].without_graph = True
self.options["boost"].without_graph_parallel = True
self.options["boost"].without_nowide = True
def imports(self):
self.copy("*.dylib", "../lib", "lib")
......
......@@ -23,6 +23,7 @@
#include <boost/align/aligned_allocator.hpp>
#include <boost/container/vector.hpp>
#include <boost/dynamic_bitset.hpp>
#include <folly/FBVector.h>
#include <limits>
#include <memory>
......@@ -123,7 +124,8 @@ using BitsetTypePtr = std::shared_ptr<boost::dynamic_bitset<>>;
using BitsetTypeOpt = std::optional<BitsetType>;
template <typename Type>
using FixedVector = boost::container::vector<Type>;
using FixedVector = folly::fbvector<
Type>; // boost::container::vector has memory leak when version > 1.79, so use folly::fbvector instead
using Config = nlohmann::json;
using TargetBitmap = FixedVector<bool>;
......
......@@ -47,13 +47,13 @@ case "${unameOut}" in
export RPATH=$LD_LIBRARY_PATH;;
Darwin*)
# detect llvm version by valid list
for llvm_version in 15 14 NOT_FOUND ; do
for llvm_version in 16 15 14 NOT_FOUND ; do
if brew ls --versions llvm@${llvm_version} > /dev/null; then
break
fi
done
if [ "${llvm_version}" = "NOT_FOUND" ] ; then
echo "valid llvm(14 or 15) not installed"
echo "valid llvm(>=14) not installed"
exit 1
fi
llvm_prefix="$(brew --prefix llvm@${llvm_version})"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册