15 Commits

Author SHA1 Message Date
Roman Lebedev
7e30707b8e [benchmark] Fix win32 link on case-sensitive fs
Summary: This fixes cross-builds with MinGW from case-sensitive file-systems (on Linux)

This is a cherry-pick from
https://github.com/google/benchmark/pull/840
8e48105d46

Original patch by: @jschueller (Julien Schueller) !

Differential Revision: https://reviews.llvm.org/D61371

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367356 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 20:47:59 +00:00
Roger Ferrer Ibanez
b8ea86256a [RISCV] Implement benchmark::cycleclock::Now
This is a cherrypick of D64237 onto llvm/utils/benchmark and
libcxx/utils/google-benchmark.

Differential Revision: https://reviews.llvm.org/D65142

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366868 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 05:33:46 +00:00
Andrew Ng
6a2f57ae8b [benchmark] Disable CMake get_git_version
Disabled CMake get_git_version as it is meaningless for this in-tree
build, and hardcoded a null version.

Not using get_git_version avoids a refresh of the git index that is
executed by get_git_version. Refreshing the index can take a
considerable amount of time if the index needs to be refreshed
(particularly with the mono repo). This situation can arise when
building shared source on a host in VMs.

Differential Revision: https://reviews.llvm.org/D63925

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364742 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-01 10:58:20 +00:00
Reid Kleckner
ee2b007283 Silence CMP0048 warning in the benchmark utility library
I'm testing this in LLVM before sending it upstream.

Part of PR38874

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349097 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 00:17:12 +00:00
Simon Pilgrim
7852f77d6c Fix -Wcovered-switch-default warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348486 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-06 14:02:02 +00:00
Elizabeth Andrews
458830edd5 [benchmark] Disable exceptions in Microsoft STL
This patch disables exceptions in Microsoft STL when exception 
handling is not enabled in Benchmark project. It fixes Windows 
builds that were failing due to C4530 warnings thrown by MS STL.

Differential Revision: https://reviews.llvm.org/D52998


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346237 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-06 15:57:59 +00:00
Aaron Ballman
19bfe6dfac Add benchmark and benchmark_main to the Utils folder in IDEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342782 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-21 22:55:57 +00:00
Martin Storsjo
80b0618b4c [benchmark] Cherrypick fix for MinGW/ARM from upstream
This fixes building for Windows on ARM, with MinGW headers.
(Building for Windows on ARM with Windows SDK still is unsupported
by the benchmark library.)

Differential Revision: https://reviews.llvm.org/D52262

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342549 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-19 14:30:45 +00:00
Martin Storsjo
520d38cd14 [benchmark] Mention another cherry-picked change in README.LLVM. NFC.
This was cherry-picked in SVN r342450.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342506 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 19:31:09 +00:00
Martin Storsjo
bdecf7785e [benchmark] Lowercase windows specific includes
The windows SDK headers don't have self-consistent casing anyway,
so we consistently use lowercase for these in other places, in order
to fix crosscompilation with mingw headers.

This applies an upstream commit:
5261307982

Differential Revision: https://reviews.llvm.org/D52181

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342450 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-18 08:44:57 +00:00
Reid Kleckner
a8ea812648 [benchmark] Fix flags used to compile benchmark library with clang-cl
`MSVC` is true for clang-cl, but `"${CMAKE_CXX_COMPILER_ID}" STREQUAL
"MSVC"` is false, so we would enable -Wall, which means -Weverything
with clang-cl, and we get tons of undesired warnings.

Use the simpler condition to fix things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341717 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 21:47:25 +00:00
Kirill Bobyrev
0cd23e06f8 [benchmark] Fix 32-bit build failure
This patch applies upstream commit:
f0901417c8

Tim Northover pointed out that benchmark build might be broken on 32-bit
macOS. This commit by Roman Lebedev (lebedev.ri) resolves the issue.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D51677

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341469 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-05 14:15:39 +00:00
Kirill Bobyrev
78367b1bd2 [NFC] Apply another commit to comply with old CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340817 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 11:05:09 +00:00
Kirill Bobyrev
b2b31f2630 [benchmark] Silence warning by applying upstream patch
ompiling benchmark library (introduced in D50894) with the latest
bootstrapped Clang produces a lot of warnings, this issue was addressed
in the upstream patch I pushed earlier.

Upstream patch:
f85304e4e3

`README.LLVM` notes were updated to reflect the latest changes.

Reviewed by: lebedev.ri

Differential Revision: https://reviews.llvm.org/D51342

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340811 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 10:27:49 +00:00
Kirill Bobyrev
18c6fab107 Pull google/benchmark library to the LLVM tree
This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any
project could use it for benchmark generation. A dummy benchmark is
added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of
the build process.

The current version does not utilize LLVM LNT and LLVM CMake
infrastructure, but that might be sufficient for most users. Two
introduced CMake variables:

* `LLVM_INCLUDE_BENCHMARKS` (`ON` by default) generates benchmark
  targets
* `LLVM_BUILD_BENCHMARKS` (`OFF` by default) adds generated
  benchmark targets to the list of default LLVM targets (i.e. if `ON`
  benchmarks will be built upon standard build invocation, e.g. `ninja` or
  `make` with no specific targets)

List of modifications:

* `BENCHMARK_ENABLE_TESTING` is disabled
* `BENCHMARK_ENABLE_EXCEPTIONS` is disabled
* `BENCHMARK_ENABLE_INSTALL` is disabled
* `BENCHMARK_ENABLE_GTEST_TESTS` is disabled
* `BENCHMARK_DOWNLOAD_DEPENDENCIES` is disabled

Original discussion can be found here:
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125023.html

Reviewed by: dberris, lebedev.ri

Subscribers: ilya-biryukov, ioeric, EricWF, lebedev.ri, srhines,
dschuff, mgorny, krytarowski, fedor.sergeev, mgrang, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D50894

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340809 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 09:42:41 +00:00