Commit 47f4beac authored by tqcq's avatar tqcq
Browse files

feat remove static for __attribute__((constructor))

parent 8204b6db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ 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()                                         \
    __attribute__((constructor)) void EnsureConstructorRunsBeforeMain()                                                \
    {                                                                                                                  \
        google_initializer_module_##name.module_name();                                                                \
    }                                                                                                                  \
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ LogMappingEvent(const tcmalloc::MappingEvent &evt)
extern "C" void
HeapProfilerStart(const char *prefix)
{
    SpinLockHolder l(&heap_lock);
    SpinLockHolder lock(&heap_lock);

    if (is_on) return;