Tier0: define STATIC_TIER0

This fixes a bunch of linker errors when trying to use tier0 utility code in new projects while not utilizing the rest of the library. We don't need to export the CThreadMutex stuff as everything we build is static. Only the logging functions should be exported, these are therefore using DLL_EXPORT explicitly.
This commit is contained in:
Kawe Mazidjatari 2024-07-06 09:31:35 +02:00
parent b5afdfe2f3
commit a03603b0bd
2 changed files with 7 additions and 7 deletions

View File

@ -107,10 +107,10 @@ void CoreMsg(LogType_t logType, LogLevel_t logLevel, eDLL_T context,
const UINT exitCode, const char* pszLogger, const char* pszFormat, ...);
// These functions do not return.
PLATFORM_INTERFACE void Msg(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
PLATFORM_INTERFACE void NetMsg(LogType_t logType, eDLL_T context, const char* uptime, const char* fmt, ...) FMTFUNCTION(4, 5);
PLATFORM_INTERFACE void Warning(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
PLATFORM_INTERFACE void Error(eDLL_T context, const UINT code, const char* fmt, ...) FMTFUNCTION(3, 4);
DLL_EXPORT void Msg(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
DLL_EXPORT void NetMsg(LogType_t logType, eDLL_T context, const char* uptime, const char* fmt, ...) FMTFUNCTION(4, 5);
DLL_EXPORT void Warning(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
DLL_EXPORT void Error(eDLL_T context, const UINT code, const char* fmt, ...) FMTFUNCTION(3, 4);
// TODO[ AMOS ]: export to DLL?
void Plat_FatalError(eDLL_T context, const char* fmt, ...);
@ -119,8 +119,8 @@ void Plat_FatalError(eDLL_T context, const char* fmt, ...);
#define DevMsg( ... ) ((void)0)
#define DevWarning( ... ) ((void)0)
#else // DBGFLAG_STRINGS_STRIP
PLATFORM_INTERFACE void DevMsg(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
PLATFORM_INTERFACE void DevWarning(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
DLL_EXPORT void DevMsg(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
DLL_EXPORT void DevWarning(eDLL_T context, const char* fmt, ...) FMTFUNCTION(2, 3);
#endif
// You can use this macro like a runtime assert macro.

View File

@ -13,7 +13,7 @@
#define V_CONSTEXPR
#endif
#define TIER0_DLL_EXPORT
#define STATIC_TIER0
#ifdef _MSC_VER
#define COMPILER_MSVC 1 // !TODO: Set in CMake!