google / tcmalloc

Apache License 2.0
4.31k stars 463 forks source link

add missing constinit to initializations #210

Closed mumbleskates closed 9 months ago

mumbleskates commented 10 months ago

In clang 18, which has constinit, a recent change caused compilation to begin failing here:

external/com_google_tcmalloc/tcmalloc/internal/percpu.h:174:33: error: 'constinit' specifier missing on initializing declaration of 'tcmalloc_slabs' [-Werror,-Wmissing-constinit]
  174 | thread_local volatile uintptr_t tcmalloc_slabs ABSL_ATTRIBUTE_WEAK = {};
      |                                 ^

This change seems to fix the complaint fairly straightforwardly.

mumbleskates commented 9 months ago

bump; I cannot see what the build failures are here.

mumbleskates commented 9 months ago

thanks!