feat remove static for __attribute__((constructor))
Some checks failed
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 2m10s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 2m8s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 2m30s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 3m26s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 3m30s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Has been cancelled

This commit is contained in:
tqcq 2024-04-29 23:33:08 +08:00
parent 8204b6db92
commit 47f4beac5e
2 changed files with 2 additions and 2 deletions

View File

@ -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(); \
} \

View File

@ -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;