Define out unused functions on WASM build
The struct iovec conversion functions that are needed on Unix are unused on WASM build. This makes the build fail with -Werror on Mac since the WASM build is treated as a variant of Unix. Cross-compilation with clang: Apple clang version 13.0.0 (clang-1300.0.27.3) Target: arm64-apple-darwin21.3.0 Fixes: QTBUG-103974 Pick-to: 6.3 6.4 Change-Id: I34c65a18832ceedb9064a98f5729e45667749461 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
78c677376a
commit
3df23b1fe4
@ -123,7 +123,7 @@ using QtMiscUtils::fromHex;
|
|||||||
namespace {
|
namespace {
|
||||||
enum DebuggerProgram { None, Gdb, Lldb };
|
enum DebuggerProgram { None, Gdb, Lldb };
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#if defined(Q_OS_UNIX) && (!defined(Q_OS_WASM) || QT_CONFIG(thread))
|
||||||
static struct iovec IoVec(struct iovec vec)
|
static struct iovec IoVec(struct iovec vec)
|
||||||
{
|
{
|
||||||
return vec;
|
return vec;
|
||||||
@ -210,7 +210,7 @@ static std::string asyncSafeToString(int n)
|
|||||||
{
|
{
|
||||||
return std::to_string(n);
|
return std::to_string(n);
|
||||||
}
|
}
|
||||||
#endif // Q_OS_UNIX
|
#endif // defined(Q_OS_UNIX)
|
||||||
} // unnamed namespace
|
} // unnamed namespace
|
||||||
|
|
||||||
static bool alreadyDebugging()
|
static bool alreadyDebugging()
|
||||||
@ -353,6 +353,7 @@ static void prepareStackTrace()
|
|||||||
#endif // Q_OS_UNIX
|
#endif // Q_OS_UNIX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(Q_OS_WASM) || QT_CONFIG(thread)
|
||||||
static void printTestRunTime()
|
static void printTestRunTime()
|
||||||
{
|
{
|
||||||
const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
|
const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());
|
||||||
@ -405,6 +406,7 @@ static void generateStackTrace()
|
|||||||
writeToStderr("=== End of stack trace ===\n");
|
writeToStderr("=== End of stack trace ===\n");
|
||||||
# endif // Q_OS_UNIX && !Q_OS_WASM
|
# endif // Q_OS_UNIX && !Q_OS_WASM
|
||||||
}
|
}
|
||||||
|
#endif // !defined(Q_OS_WASM) || QT_CONFIG(thread)
|
||||||
|
|
||||||
static bool installCoverageTool(const char * appname, const char * testname)
|
static bool installCoverageTool(const char * appname, const char * testname)
|
||||||
{
|
{
|
||||||
@ -1287,7 +1289,7 @@ public:
|
|||||||
void testFinished() {};
|
void testFinished() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // QT_CONFIG(thread)
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user