trying to make it work without -rdynamic
This commit is contained in:
@@ -11,7 +11,6 @@ ifeq ($(UNAME_S),Darwin)
|
||||
CCFLAGS += -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++11 -Wl,-export_dynamic
|
||||
endif
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
CCFLAGS += -rdynamic
|
||||
endif
|
||||
|
||||
recompile: ../build/tools
|
||||
|
||||
@@ -2,22 +2,15 @@
|
||||
#include "ld.h"
|
||||
#include "helper.h"
|
||||
#include "tier0/platform.h"
|
||||
#include "tier1/interface.h"
|
||||
#include "signal.h"
|
||||
|
||||
ADD_DEPENDENCY_BUILD_FILE("../tier0/__build.cpp")
|
||||
ADD_DEPENDENCY_BUILD_FILE("../tier1/__build.cpp")
|
||||
ADD_DEPENDENCY_BUILD_FILE("../tier2/__build.cpp")
|
||||
|
||||
|
||||
CUtlVector<CUtlString> g_CompiledFiles = {
|
||||
|
||||
"../tier0/lib.cpp",
|
||||
"../tier0/mem.cpp",
|
||||
"../tier0/platform.cpp",
|
||||
"../tier1/interface.cpp",
|
||||
"../tier1/utlbuffer.cpp",
|
||||
"../tier1/utlstring.cpp",
|
||||
"../tier1/utlvector.cpp",
|
||||
"../tier1/utlmap.cpp",
|
||||
"../tier1/commandline.cpp",
|
||||
"../tier2/filesystem.cpp",
|
||||
"../tier2/filesystem_libc.cpp",
|
||||
"../tier2/fileformats/ini.cpp",
|
||||
|
||||
"main.cpp",
|
||||
"library/runner.cpp",
|
||||
@@ -39,6 +32,11 @@ CUtlVector<CUtlString> g_CompiledFiles = {
|
||||
|
||||
};
|
||||
|
||||
CreateInterfaceFn fpcFactory;
|
||||
ILinker *linker;
|
||||
ICCompiler *ccompiler;
|
||||
IFileSystem2 *filesystem2;
|
||||
|
||||
CUtlVector<CUtlString> g_IncludeDirectories = {
|
||||
"public",
|
||||
"../public",
|
||||
@@ -47,6 +45,10 @@ CUtlVector<CUtlString> g_IncludeDirectories = {
|
||||
|
||||
DECLARE_BUILD_STAGE(fpc)
|
||||
{
|
||||
DEPEND_ON_PROJECT("tier0");
|
||||
DEPEND_ON_PROJECT("tier1");
|
||||
DEPEND_ON_PROJECT("tier2");
|
||||
|
||||
if (linker->IsLibraryExists("clang"))
|
||||
g_CompiledFiles.AppendTail("library/clang/c_libclang.cpp");
|
||||
else
|
||||
@@ -58,6 +60,8 @@ DECLARE_BUILD_STAGE(fpc)
|
||||
compileProject.files = g_CompiledFiles;
|
||||
compileProject.includeDirectories = g_IncludeDirectories;
|
||||
ldProject = ccompiler->Compile(&compileProject);
|
||||
ldProject.libraryObjects = GET_PROJECT_LIBRARY("tier0", "tier0");
|
||||
|
||||
if (linker->IsLibraryExists("clang"))
|
||||
ldProject.libraries.AppendTail("clang");
|
||||
|
||||
|
||||
@@ -46,9 +46,11 @@ public:
|
||||
virtual void CopyFile( const char *szDestination, const char *szOrigin ) override;
|
||||
virtual void CopyDirectory( const char *szDestination, const char *szOrigin ) override;
|
||||
virtual bool ShouldRecompile( const char *szSource, const char *szOutput ) override;
|
||||
virtual char *GetWindowsPath( const char *szPath ) override;
|
||||
virtual char *GetPOSIXPath( const char *szPath ) override;
|
||||
};
|
||||
|
||||
char *GetWindowsPath( const char *szPath )
|
||||
char *CPOSIXFileSystem2::GetWindowsPath( const char *szPath )
|
||||
{
|
||||
char *szNewPath = (char*)V_malloc(V_strlen(szPath)+1);
|
||||
int i = 0;
|
||||
@@ -62,7 +64,7 @@ char *GetWindowsPath( const char *szPath )
|
||||
return szNewPath;
|
||||
}
|
||||
|
||||
char *GetPOSIXPath( const char *szPath )
|
||||
char *CPOSIXFileSystem2::GetPOSIXPath( const char *szPath )
|
||||
{
|
||||
char *szNewPath = (char*)V_malloc(V_strlen(szPath)+1);
|
||||
int i = 0;
|
||||
|
||||
@@ -67,11 +67,12 @@ public:
|
||||
|
||||
// Compares timestamps of 2 files
|
||||
virtual bool ShouldRecompile( const char *szSource, const char *szOutput ) = 0;
|
||||
|
||||
virtual char *GetWindowsPath( const char *szPath ) = 0;
|
||||
virtual char *GetPOSIXPath( const char *szPath ) = 0;
|
||||
};
|
||||
|
||||
extern IFileSystem2 *filesystem2;
|
||||
char *GetWindowsPath( const char *szPath );
|
||||
char *GetPOSIXPath( const char *szPath );
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -98,6 +99,14 @@ int __build_stage_##sz(); \
|
||||
CBuildStage __##sz##_build_stage(#sz, __build_stage_##sz); \
|
||||
int __build_stage_##sz()
|
||||
|
||||
#define ADD_DEPENDENCY_BUILD_FILE(sz) \
|
||||
|
||||
#define ADD_OUTPUT_LIBRARY(sz) \
|
||||
|
||||
#define DEPEND_ON_PROJECT(sz) \
|
||||
|
||||
#define GET_PROJECT_LIBRARY(sz, szLib) \
|
||||
|
||||
// Returns all available build stages
|
||||
// Used internally
|
||||
CUtlVector<CBuildStage*>& BuildStages();
|
||||
|
||||
Reference in New Issue
Block a user