started to improve compiler

This commit is contained in:
2025-10-29 13:41:59 +02:00
parent a22ab19a8c
commit 34e54fdc0d
5 changed files with 22 additions and 8 deletions

View File

@@ -22,7 +22,6 @@ class CClangCompiler : public ICCompiler
{
public:
virtual LinkProject_t Compile( CProject_t *pProject ) override;
virtual void GenerateLinterData( void ) override;
};
EXPOSE_INTERFACE(CClangCompiler, ICCompiler, CLANG_C_COMPILER_INTERFACE_NAME);

View File

View File

@@ -55,8 +55,7 @@ LinkProject_t CMSVCCompiler::Compile( CProject_t *pProject )
if (!pSection)
Plat_FatalErrorFunc("MSVC_C_COMPILER_INTERFACE_NAME was not found in .fpccfg\n");
CUtlString szExePath = pSection->GetStringValue("exe");
if (!pSection)
Plat_FatalErrorFunc("exe was not found in MSVC_C_COMPILER_INTERFACE_NAME\n");
bool bUseClangCL = pSection->GetStringValue("exe");

0
fpc/library/windows/c.h Normal file
View File

View File

@@ -83,8 +83,9 @@ public:
// Target C++ version
ECPPVersion cppVersion;
// TODO: rework manifests
// Android manifest
AndroidManifest_t m_androidmanifest;
AndroidManifest_t m_androidmanifest;
};
// Basic interface name
@@ -99,11 +100,26 @@ public:
// Compiles all files into objects, returns linker project,
// which can be linked into executable or library.
virtual LinkProject_t Compile( CProject_t *pProject ) = 0;
virtual LinkProject_t Compile( CProject_t *pProject );
protected:
// Compiler internals
// Returns file name of the
CUtlString GetOutputObjectName( CUtlString szFileName );
virtual CUtlVector<CUtlString> BuildCommandLine( CProject_t *pProject );
// Returns executable which should the OS run
virtual CUtlString GetCompilerExecutable( CProject_t *pProject ) = 0;
virtual const char *GetOutputObjectFormat() = 0;
virtual bool IncludeDirectory( CUtlVector<CUtlString> &cmd ) = 0;
virtual bool IncludeFile( CUtlVector<CUtlString> &cmd ) = 0;
virtual void Macro( const char *szName ) = 0;
virtual void Macro( const char *szName, const char *szValue ) = 0;
// Generates linter data
// Handled by the fpc automatically
virtual void GenerateLinterData( void ) = 0;
};
extern ICCompiler *ccompiler;