Chromium doesn't compile with -Wglobal-constructors |
|||
Issue descriptionChrome Version: 57.0.2979.0 OS: Linux What steps will reproduce the problem? Try to compile chromium with clang compilation flag -Wglobal-constructors. What is the expected result? Chromium compiles. What happens instead? Chromium fails to compile. We compile chromium with clang flag -Wglobal-constructors in our project. We have following compilation error during compilation of user_input_tracker.cc: ../../chrome/browser/page_load_metrics/user_input_tracker.cc:27:11: error: declaration requires a global constructor [-Werror,-Wglobal-constructors] const int kRateLimitClampMillis = (kOldestAllowedEventAgeSeconds * 1000) / In order to get rid of this global constructor I recommend to declare static class variable UserInputTracker::kMaxTrackedEvents and global variable kRateLimitClampMillis as constexpr which will be expanded to numerical value during compilation.
,
Jan 30 2017
Is this fixed now? Can it be closed?
,
Jan 30 2017
Yes, fix landed on master and the issue can be closed.
,
Jan 30 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Jan 30 2017