no engine anymore
This commit is contained in:
@@ -11,31 +11,30 @@ CUtlVector<CUtlString> tier0_CompiledFiles = {
|
||||
"tier0/network.cpp",
|
||||
};
|
||||
|
||||
int tier0_build()
|
||||
DECLARE_BUILD_STAGE(tier0)
|
||||
{
|
||||
CCProject compileProject = {};
|
||||
CLDProject ldProject = {};
|
||||
CProject_t compileProject = {};
|
||||
LinkProject_t ldProject = {};
|
||||
|
||||
compileProject.m_szName = "tier0";
|
||||
compileProject.files = tier0_CompiledFiles;
|
||||
compileProject.includeDirectories = all_IncludeDirectories;
|
||||
compileProject.bFPIC = true;
|
||||
ldProject = compileProject.Compile();
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
if (bStaticBuild)
|
||||
ldProject.linkType = ELINK_STATIC_LIBRARY;
|
||||
else
|
||||
ldProject.linkType = ELINK_DYNAMIC_LIBRARY;
|
||||
|
||||
CUtlString outputProject = ldProject.Link();
|
||||
CUtlString outputProject = linker->Link(&ldProject);
|
||||
|
||||
if (!bStaticBuild)
|
||||
{
|
||||
IFileSystem2::MakeDirectory(CUtlString("%s/bin",szOutputDir.GetString()));
|
||||
IFileSystem2::CopyFile(CUtlString("%s/bin", szOutputDir.GetString()), outputProject);
|
||||
filesystem2->MakeDirectory(CUtlString("%s/bin",szOutputDir.GetString()));
|
||||
filesystem2->CopyFile(CUtlString("%s/bin", szOutputDir.GetString()), outputProject);
|
||||
} else {
|
||||
tier0_lib = outputProject;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
DECLARE_BUILD_STAGE(tier0, tier0_build);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "tier0/mem.h"
|
||||
#include "stdlib.h"
|
||||
#include "tier0/platform.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// These functions copy over libc memory functions
|
||||
@@ -7,7 +8,10 @@
|
||||
|
||||
void* V_malloc(int nSize)
|
||||
{
|
||||
return malloc(nSize);
|
||||
void *pMemory = malloc(nSize);
|
||||
if (!pMemory)
|
||||
Plat_FatalErrorFunc("Failed to allocate memory");
|
||||
return pMemory;
|
||||
}
|
||||
|
||||
void V_free(void *pMem)
|
||||
@@ -19,3 +23,18 @@ void* V_realloc(void *pMem, int nSize)
|
||||
{
|
||||
return realloc(pMem, nSize);
|
||||
}
|
||||
|
||||
void *operator new( size_t nCount )
|
||||
{
|
||||
return V_malloc(nCount);
|
||||
}
|
||||
|
||||
void *operator new ( size_t nCount, void *pPtr )
|
||||
{
|
||||
return pPtr;
|
||||
}
|
||||
|
||||
void operator delete( void *pMem ) noexcept
|
||||
{
|
||||
return V_free(pMem);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,9 @@ PLATFORM_INTERFACE void Plat_FatalErrorFunc(const char* szFormat, ...)
|
||||
V_vprintf(szFormat, list);
|
||||
va_end(list);
|
||||
fflush(stdout);
|
||||
#ifdef __WIN32__
|
||||
#if defined(__WIN32__)
|
||||
__debugbreak();
|
||||
#elif defined(__wasm32__)
|
||||
#else
|
||||
raise(SIGTRAP);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user