WASM: don't use a static_assert when an #error would suffice

No need to involve the compiler, make the preprocessor error out.

Change-Id: I37d3f241bd0879ba123fe26342aaaaff74c2fb6b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2022-12-05 12:58:22 +01:00
parent 04e668f6ba
commit e7e3e4cf25

View File

@ -6,7 +6,7 @@
#include <emscripten/val.h>
#if !defined(Q_OS_WASM)
static_assert(false, "This is a wasm-only file.");
#error This is a wasm-only file.
#endif // !defined(Q_OS_WASM)
QT_BEGIN_NAMESPACE