mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[BOLT] Allow processing of binaries with stripped FILE symbols mismatching the profile (#93238)
Reintroduce allow-stripped as a fallback mechanism after enforcement of
HasSymbolsWithFileName was fixed in
https://github.com/llvm/llvm-project/pull/92625.
This partially reverts commit ccabbfff86.
This commit is contained in:
@@ -3206,12 +3206,14 @@ void RewriteInstance::preprocessProfileData() {
|
||||
if (Error E = ProfileReader->preprocessProfile(*BC.get()))
|
||||
report_error("cannot pre-process profile", std::move(E));
|
||||
|
||||
if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName()) {
|
||||
if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName() &&
|
||||
!opts::AllowStripped) {
|
||||
BC->errs()
|
||||
<< "BOLT-ERROR: input binary does not have local file symbols "
|
||||
"but profile data includes function names with embedded file "
|
||||
"names. It appears that the input binary was stripped while a "
|
||||
"profiled binary was not\n";
|
||||
"profiled binary was not. If you know what you are doing and "
|
||||
"wish to proceed, use -allow-stripped option.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user