-
-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Google Benchmark to v1.5.0 #3386
Conversation
This is based on looking at the changes in CMakeLists.txt
(Cherry-picked by @philix to bring back changes made to GBenchmark)
The MSVC build treats warning as errors and Google Benchmark has a lossy conversion (from `double` to `int64_t`) which triggers warning C4244. ``` benchmark_runner.cc(267): error C2220: warning treated as error - no 'object' file generated benchmark_runner.cc(267): warning C4244: 'initializing': conversion from 'double' to 'benchmark::IterationCount', possible loss of data ```
@@ -616,7 +616,8 @@ libponyc.benchmarks.buildoptions += -DLLVM_BUILD_MODE=$(LLVM_BUILD_MODE) | |||
|
|||
libgbenchmark.buildoptions := \ | |||
-Wshadow -pedantic -pedantic-errors \ | |||
-Wfloat-equal -fstrict-aliasing -Wstrict-aliasing -Wno-invalid-offsetof \ | |||
-fstrict-aliasing -Wstrict-aliasing \ | |||
-Wno-invalid-offsetof -Wno-deprecated-declarations \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change here is to address what exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! These were intentional.
As the commit message says, these reflect the changes in gbenchmark's CMakeLists.txt.
I think they removed -Wfloat-equal
because if you have -Wall
, you don't have to explicitly enable this warning. Either that or they really want to ==
floats and know what they're doing.
And -Wno-deprecated-declarations
was added because they deprecated the CSVReporter
and they use -Werror
like ponyc
does so it becomes impossible to build gbenchmark
without disabling the warning. See google/benchmark#608
-Wno-invalid-offsetof
was moved to avoid mixing the -Wno-
with other flags. This could probably be removed but it was here from the beginning so I kept it.
This looks good to me, but I would want to know about the changes to our Makefile and get an explanation to make sure that each of the changes was done intentionally. Thanks, @philix. If you can comment, we can get this merged. |
Awesome. Thanks, @philix. |
Followed the idea behind #2669 -- copy the google/benchmark repo contents instead of using
git subtree
.I used
git log lib/gbenchmark
to see if there wereponyc
-specific changes and found a commit from #2823. I cherry-picked it to get the remaininggbenchmark
changes necessary. These changes should probably be merged to the upstream Google Benchmark repo to improve its OpenBSD support.