Skip to content

Commit

Permalink
Merge pull request ceph#40591 from tchaikov/wip-dencoder
Browse files Browse the repository at this point in the history
tools/ceph-dencoder: link against libtcmalloc

Reviewed-by: Willem Jan Withagen <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
tchaikov authored Apr 6, 2021
2 parents 0f1aa79 + 195d1e8 commit 38946da
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/ceph-dencoder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -100,5 +100,6 @@ target_link_libraries(ceph-dencoder
cls_user_client
cls_cas_client
${EXTRALIBS}
${CMAKE_DL_LIBS})
${CMAKE_DL_LIBS}
${ALLOC_LIBS})
install(TARGETS ceph-dencoder DESTINATION bin)
7 changes: 7 additions & 0 deletions src/tools/ceph-dencoder/ceph_dencoder.cc
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ namespace fs = std::filesystem;
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif
#include <iomanip>

#include "ceph_ver.h"
#include "include/types.h"
@@ -105,6 +106,12 @@ vector<DencoderPlugin> load_plugins()
if (auto ceph_lib = getenv("CEPH_LIB"); ceph_lib) {
mod_dir = ceph_lib;
}
if (!fs::is_directory(mod_dir)) {
std::cerr << "unable to load dencoders from "
<< std::quoted(mod_dir.native()) << ". "
<< "it is not a directory." << std::endl;
return {};
}
vector<DencoderPlugin> dencoder_plugins;
for (auto& entry : fs::directory_iterator(mod_dir)) {
static const string_view DENC_MOD_PREFIX = "denc-mod-";

0 comments on commit 38946da

Please sign in to comment.