Browse Source

fix dedicated build

dedicated-build-fix
nillerusr 2 years ago
parent
commit
c4ef0e90a4
  1. 29
      .github/workflows/build.yml
  2. 5
      datacache/datacache.h
  3. 2
      game/shared/collisionproperty.cpp
  4. 2
      public/engine/thinktracecounter.h
  5. 17
      public/tier0/threadtools.h
  6. 2
      scripts/build-ubuntu-amd64.sh
  7. 2
      scripts/build-ubuntu-i386.sh
  8. 8
      tier0/threadtools.cpp

29
.github/workflows/build.yml

@ -46,3 +46,32 @@ jobs: @@ -46,3 +46,32 @@ jobs:
git submodule init && git submodule update
./waf.bat configure -T debug
./waf.bat build
build-dedicated-windows-i386:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build dedicated windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d
./waf.bat build
build-dedicated-linux-32:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-i386
run: |
scripts/build-ubuntu-i386.sh -d
build-dedicated-linux-64:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Build dedicated linux-amd64
run: |
scripts/build-ubuntu-amd64.sh -d

5
datacache/datacache.h vendored

@ -181,10 +181,9 @@ private: @@ -181,10 +181,9 @@ private:
DataCacheItem_t *m_pFirst;
int m_iThread;
};
typedef CThreadLocal<FrameLock_t *> CThreadFrameLock;
CDataCacheLRU & m_LRU;
CThreadFrameLock m_ThreadFrameLock;
CTHREADLOCAL(FrameLock_t*) m_ThreadFrameLock;
DataCacheStatus_t m_status;
DataCacheLimits_t m_limits;
IDataCacheClient * m_pClient;
@ -381,4 +380,4 @@ inline void CDataCacheSection::NoteUnlock( int size ) @@ -381,4 +380,4 @@ inline void CDataCacheSection::NoteUnlock( int size )
//-----------------------------------------------------------------------------
#endif // DATACACHE_H
#endif // DATACACHE_H

2
game/shared/collisionproperty.cpp

@ -78,7 +78,7 @@ private: @@ -78,7 +78,7 @@ private:
CTSListWithFreeList<CBaseHandle> m_DirtyEntities;
CThreadSpinRWLock m_partitionMutex;
uint32 m_partitionWriteId;
CThreadLocalInt<> m_readLockCount;
CTHREADLOCALINT m_readLockCount;
};

2
public/engine/thinktracecounter.h

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
#ifdef THINK_TRACE_COUNTER_COMPILED
// create a macro that is true if we are allowed to debug traces during thinks, and compiles out to nothing otherwise.
#if defined( _GAMECONSOLE ) || defined( NO_STEAM )
#define DEBUG_THINK_TRACE_COUNTER_ALLOWED() (!IsCert())
#define DEBUG_THINK_TRACE_COUNTER_ALLOWED() (false)
#else
#ifdef THINK_TRACE_COUNTER_COMPILE_FUNCTIONS_ENGINE
bool DEBUG_THINK_TRACE_COUNTER_ALLOWED()

17
public/tier0/threadtools.h

@ -486,22 +486,7 @@ PLATFORM_INTERFACE void ThreadNotifySyncReleasing(void *p); @@ -486,22 +486,7 @@ PLATFORM_INTERFACE void ThreadNotifySyncReleasing(void *p);
#ifndef NO_THREAD_LOCAL
#if ( defined(_LINUX) && defined(DEDICATED) ) && !defined(OSX)
// linux totally supports compiler thread locals, even across dll's.
#define PLAT_COMPILER_SUPPORTED_THREADLOCALS 1
#define CTHREADLOCALINTEGER( typ ) __thread int
#define CTHREADLOCALINT __thread int
#define CTHREADLOCALPTR( typ ) __thread typ *
#define CTHREADLOCAL( typ ) __thread typ
#define GETLOCAL( x ) ( x )
#ifndef TIER0_DLL_EXPORT
DLL_IMPORT __thread int g_nThreadID;
#endif
#endif
#if defined(WIN32) || defined(OSX) || defined( _PS3 ) || ( defined (_LINUX) && !defined(DEDICATED) )
#if defined(WIN32) || defined(OSX) || defined( _PS3 ) || ( defined (_LINUX) )
#ifndef __AFXTLS_H__ // not compatible with some Windows headers
#if defined(_PS3)

2
scripts/build-ubuntu-amd64.sh

@ -4,5 +4,5 @@ git submodule init && git submodule update @@ -4,5 +4,5 @@ git submodule init && git submodule update
sudo apt-get update
sudo apt-get install -f -y libopenal-dev g++-multilib gcc-multilib libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev
./waf configure -T debug --64bits --disable-warns &&
./waf configure -T debug --64bits --disable-warns $* &&
./waf build

2
scripts/build-ubuntu-i386.sh

@ -5,5 +5,5 @@ sudo dpkg --add-architecture i386 @@ -5,5 +5,5 @@ sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -f -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns &&
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns $* &&
./waf build

8
tier0/threadtools.cpp

@ -94,11 +94,7 @@ const int MAX_THREAD_IDS = 128; @@ -94,11 +94,7 @@ const int MAX_THREAD_IDS = 128;
static volatile bool s_bThreadIDAllocated[MAX_THREAD_IDS];
#if defined(_LINUX) && defined(DEDICATED)
DLL_CLASS_EXPORT __thread int g_nThreadID;
#elif defined(_PS3)
#if defined(_PS3)
#include "tls_ps3.h"
#else
DLL_CLASS_EXPORT CTHREADLOCALINT g_nThreadID;
@ -1684,7 +1680,7 @@ bool CThreadFullMutex::Release() @@ -1684,7 +1680,7 @@ bool CThreadFullMutex::Release()
//
//-----------------------------------------------------------------------------
#if defined( WIN32 ) || defined( _PS3 ) || defined( _OSX ) || ( defined (_LINUX) && !defined(DEDICATED) )
#if defined( WIN32 ) || defined( _PS3 ) || defined( _OSX ) || defined (_LINUX)
#if !defined(_PS3)
namespace GenericThreadLocals
{

Loading…
Cancel
Save