Commit b686d8f
Allow stripping of file cleanup code
Summary:
The linker currently cannot strip the file cleanup code because it is
called on fatal errors and signals (when a the LLVM signal handler is
installed). To allow it to be stripped, add a layer of indirection
through a function pointer, which is only populated by
`RemoveFileOnSignal`. This way, the cleanup code is only considered
reachable when `RemoveFileOnSignal` is actually used, and it can be
stripped otherwise.
Reviewed By: tmikov
Differential Revision: D53535800
fbshipit-source-id: ae26197a66bc154dd83eb304b4c731eabac108731 parent 09eab96 commit b686d8f
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
| |||
327 | 332 | | |
328 | 333 | | |
329 | 334 | | |
330 | | - | |
| 335 | + | |
| 336 | + | |
331 | 337 | | |
332 | 338 | | |
333 | 339 | | |
| |||
353 | 359 | | |
354 | 360 | | |
355 | 361 | | |
356 | | - | |
| 362 | + | |
| 363 | + | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| 377 | + | |
370 | 378 | | |
371 | 379 | | |
372 | 380 | | |
| |||
0 commit comments