fix(wayland): constant-initialised statics in Device, for clang 23.1 on aarch64-musl
With the touch positions in an inline static std::unordered_map and the text input's strings in inline static std::strings, clang 23.1 crashed compiling Device.cpp for aarch64-alpine-linux-musl against that sysroot's libc++ 22 — in LazyCallGraph at -O3, in the ThinLTO bitcode writer at -O0 (a dangling global); the native build was fine. The fingers now live in a constant-initialised array of slots and the strings in function-local statics of the implementation unit; nothing else changes.
This commit is contained in:
parent
0d8287c122
commit
cc04d4e121
3 changed files with 80 additions and 23 deletions
|
|
@ -560,7 +560,7 @@ Window::~Window() {
|
|||
if (Device::keyboardWindow == this) Device::keyboardWindow = nullptr;
|
||||
if (Device::touchWindow == this) {
|
||||
Device::touchWindow = nullptr;
|
||||
Device::touchPositions.clear();
|
||||
Device::ForgetTouches();
|
||||
}
|
||||
if (Device::textInputWindow == this) Device::textInputWindow = nullptr;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue