Add test for parallel mode

Summary:
Add a flag that disable writing botl-info section
and add a test that run bolt with two modes parallel
and sequential and assert that the resulting binaries
are the same.

(cherry picked from FBD16575440)
This commit is contained in:
laith sakka 2019-07-30 17:55:27 -07:00 committed by Maksim Panchenko
parent cc8415406c
commit c1564a1026
1 changed files with 8 additions and 1 deletions

View File

@ -439,6 +439,12 @@ SequentialDisassembly("sequential-disassembly",
cl::init(false),
cl::cat(BoltOptCategory));
static cl::opt<bool>
WriteBoltInfoSection("write-bolt-info-section",
cl::desc("write bolt info section in the output binary"),
cl::init(true),
cl::cat(BoltOutputCategory));
bool isHotTextMover(const BinaryFunction &Function) {
for (auto &SectionName : opts::HotTextMoveSections) {
if (Function.getOriginSectionName() == SectionName)
@ -1138,7 +1144,8 @@ void RewriteInstance::run() {
DebugInfoRewriter->updateDebugInfo();
}
addBoltInfoSection();
if (opts::WriteBoltInfoSection)
addBoltInfoSection();
// Copy allocatable part of the input.
std::error_code EC;