Justin Cohenwdyt? are we OK with a static initializer here?
Acknowledged
client: Make CrashpadInfo constructor constexprJustin CohenThe operative thing here is more that g_crashpad_info is constinit, or that you’re eliminating a module initializer.
Sure, making the constructor constexpr is part of how you achieve that, but it’s not the main operative thing.
Done -- updated the CL description to add:
Make g_crashpad_info constinit, with a constexpr CrashpadInfo
constructor, so that it is constant-initialized at compile time in all
builds and no module initializer is emitted.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
client: Eliminate the g_crashpad_info module initializer
After LLVM commit 57a637ad382b, GlobalOpt no longer constant-folds
runtime constructors into globals placed in an explicit section (Apple
`section()` and Windows `__declspec(allocate())`). This left a module
initializer (_GLOBAL__sub_I_crashpad_info.cc) for g_crashpad_info in
optimized builds. Debug builds always had one, since GlobalOpt does not
run at -O0.
Make g_crashpad_info constinit, with a constexpr CrashpadInfo
constructor, so that it is constant-initialized at compile time in all
builds and no module initializer is emitted.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |