Individual compilation units for benchmark data files
This creates individual compilation units for individual benchmark data files, instead of one compilation unit for all data files together.
It also no longer tries to compile the src/bench/data.h
header - still
don't get why Bitcoin Core did that.
For simplicity, the raw file conversion script is now disconnected from the build sytems; instead, its generated output is committed into the repository.
The conversion script now automatically detects all
src/bench/data/*.raw
files, converts them to src/bench/data/*.cpp
files, and writes the file list into src/bench/data.h
.
The only thing the user needs to do manually is to update the list of cpp files in the build system commands (before this MR, the user instead had to manually update the list of raw files in the build system commands).
While there is still onlye one data file, this MR prepares for adding more data files later, such as 32MB block suggested in !104 (closed). Because the raw file conversion is now cleanly separated from both build systems, this MR also gives more freedom to efficiently deal with large files later.
Test plan:
- run convert-raw-files.py and verify the output files are as committed
- compile the benchmarks with both build systems
- run the benchmarks (beware of #59 (closed))