File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ cl::opt<std::string>
105
105
" output binary via bolt info section" ),
106
106
cl::cat(BoltCategory));
107
107
108
+ cl::opt<bool >
109
+ AllowStripped (" allow-stripped" ,
110
+ cl::desc (" allow processing of stripped binaries" ),
111
+ cl::Hidden,
112
+ cl::cat(BoltCategory));
113
+
108
114
cl::opt<bool > DumpDotAll (
109
115
" dump-dot-all" ,
110
116
cl::desc (" dump function CFGs to graphviz format after each stage;"
@@ -3206,12 +3212,14 @@ void RewriteInstance::preprocessProfileData() {
3206
3212
if (Error E = ProfileReader->preprocessProfile (*BC.get ()))
3207
3213
report_error (" cannot pre-process profile" , std::move (E));
3208
3214
3209
- if (!BC->hasSymbolsWithFileName () && ProfileReader->hasLocalsWithFileName ()) {
3215
+ if (!BC->hasSymbolsWithFileName () && ProfileReader->hasLocalsWithFileName () &&
3216
+ !opts::AllowStripped) {
3210
3217
BC->errs ()
3211
3218
<< " BOLT-ERROR: input binary does not have local file symbols "
3212
3219
" but profile data includes function names with embedded file "
3213
3220
" names. It appears that the input binary was stripped while a "
3214
- " profiled binary was not\n " ;
3221
+ " profiled binary was not. If you know what you are doing and "
3222
+ " wish to proceed, use -allow-stripped option.\n " ;
3215
3223
exit (1 );
3216
3224
}
3217
3225
}
You can’t perform that action at this time.
0 commit comments