diff --git a/mold.h b/mold.h index e3731ff7..8c4bebc9 100644 --- a/mold.h +++ b/mold.h @@ -862,13 +862,13 @@ public: static void print(); - static bool enabled; + static inline bool enabled = false; private: std::string_view name; std::atomic_uint32_t value; - static std::vector instances; + static inline std::vector instances; }; struct TimerRecord { diff --git a/perf.cc b/perf.cc index 331fb2a1..d1dedfdf 100644 --- a/perf.cc +++ b/perf.cc @@ -5,9 +5,6 @@ #include #include -std::vector Counter::instances; -bool Counter::enabled = false; - void Counter::print() { if (!enabled) return;