diff options
author | Derek Mauro <dmauro@google.com> | 2022-12-12 13:15:40 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-12-12 13:16:33 -0800 |
commit | 553491a54cdb842ab583942e1058cbdcedd32018 (patch) | |
tree | 07dc831effb7532023a0582a799838858baab13c /absl/flags/flag_benchmark.cc | |
parent | b23ae860ba864e4224aab7f7073d7d0d60f05a43 (diff) | |
download | abseil-553491a54cdb842ab583942e1058cbdcedd32018.tar.gz abseil-553491a54cdb842ab583942e1058cbdcedd32018.tar.bz2 abseil-553491a54cdb842ab583942e1058cbdcedd32018.zip |
Only build the section of flag_benchmark used for viewing the
disassembly under LLVM. Due to the issue described in
https://github.com/abseil/abseil-cpp/issues/1340 and
https://github.com/google/benchmark/commit/8545dfb3ea301f5c77626a046d4756ef9f2e4970
it no longer builds under GCC.
The other changes are necessary to fix the build using the latest benchmark snapshot
Fixes #1340
PiperOrigin-RevId: 494809290
Change-Id: I4a03b2e2dcbdc273e59f1f09f204322e388e7cea
Diffstat (limited to 'absl/flags/flag_benchmark.cc')
-rw-r--r-- | absl/flags/flag_benchmark.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/absl/flags/flag_benchmark.cc b/absl/flags/flag_benchmark.cc index fc572d9c..758a6a55 100644 --- a/absl/flags/flag_benchmark.cc +++ b/absl/flags/flag_benchmark.cc @@ -241,10 +241,11 @@ BENCHMARK(BM_ThreadedFindCommandLineFlag)->ThreadRange(1, 16); } // namespace +#ifdef __llvm__ +// To view disassembly use: gdb ${BINARY} -batch -ex "disassemble /s $FUNC" #define InvokeGetFlag(T) \ T AbslInvokeGetFlag##T() { return absl::GetFlag(SINGLE_FLAG(T)); } \ int odr##T = (benchmark::DoNotOptimize(AbslInvokeGetFlag##T), 1); BENCHMARKED_TYPES(InvokeGetFlag) - -// To veiw disassembly use: gdb ${BINARY} -batch -ex "disassemble /s $FUNC" +#endif // __llvm__ |