Commit 36a3c714 authored by tqcq's avatar tqcq
Browse files

fix gpertools initializer

parent 2c07bea7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -63,7 +63,10 @@ private:
    namespace {                                                                                                        \
    static void google_init_module_##name() { body; }                                                                  \
    GoogleInitializer google_initializer_module_##name(#name, google_init_module_##name, NULL);                        \
    __attribute__((constructor)) static void EnsureConstructorRunsBeforeMain() { google_init_module_##name().name(); } \
    __attribute__((constructor)) static void EnsureConstructorRunsBeforeMain()                                         \
    {                                                                                                                  \
        google_initializer_module_##name().name();                                                                     \
    }                                                                                                                  \
    }

#define REGISTER_MODULE_DESTRUCTOR(name, body)                                                                         \
+2 −1
Original line number Diff line number Diff line
@@ -106,12 +106,13 @@ target_sources(

target_link_libraries(
  sled
  PUBLIC rpc_core fmt marl Async++ minilua protobuf::libprotobuf
  PUBLIC rpc_core fmt marl Async++ minilua
         # protobuf::libprotoc
  PRIVATE dl)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
  target_link_libraries(sled PRIVATE tcmalloc_and_profiler_static)
endif()

if(SLED_WITH_PROTOBUF)
  target_link_libraries(sled PUBLIC protobuf::libprotobuf)
endif()