fpc
This commit is contained in:
@@ -49,8 +49,14 @@ CUtlString CMSVCLinker::Link( LinkProject_t *pProject )
|
||||
szOutputDir = dirname(szOutputDir);
|
||||
filesystem2->MakeDirectory(szOutputDir);
|
||||
|
||||
if (!g_pConfig)
|
||||
Plat_FatalErrorFunc(".fpccfg was not found");
|
||||
IINISection *pSection = g_pConfig->GetSection("MSVC_LINKER_INTERFACE_NAME");
|
||||
if (!pSection)
|
||||
Plat_FatalErrorFunc("MSVC_LINKER_INTERFACE_NAME was not found in .fpccfg");
|
||||
CUtlString szExePath = pSection->GetStringValue("exe");
|
||||
if (!pSection)
|
||||
Plat_FatalErrorFunc("exe was not found in MSVC_LINKER_INTERFACE_NAME");
|
||||
|
||||
if (pProject->linkType == ELINK_STATIC_LIBRARY)
|
||||
{
|
||||
@@ -106,11 +112,15 @@ CUtlString CMSVCLinker::Link( LinkProject_t *pProject )
|
||||
"-target",
|
||||
szCompiledTarget,
|
||||
};
|
||||
if (pProject->linkType == ELINK_KERNEL_DRIVER)
|
||||
{
|
||||
args.AppendTail("/driver");
|
||||
args.AppendTail(CUtlString("/entry:\"%s\"", pProject->szEntry));
|
||||
}
|
||||
|
||||
// Disable stdlib
|
||||
if (pProject->bNoStdLib)
|
||||
{
|
||||
args.AppendTail("-nostdlib");
|
||||
}
|
||||
|
||||
for (auto object: pProject->objects)
|
||||
@@ -118,21 +128,12 @@ CUtlString CMSVCLinker::Link( LinkProject_t *pProject )
|
||||
|
||||
for (auto lib: pProject->libraries)
|
||||
{
|
||||
/*
|
||||
args.AppendTail("-l");
|
||||
args.AppendTail(lib);
|
||||
*/
|
||||
}
|
||||
|
||||
// Apple frameworks
|
||||
for (auto &directory: pProject->frameworkDirectories)
|
||||
{
|
||||
args.AppendTail("-F");
|
||||
args.AppendTail(directory);
|
||||
}
|
||||
for (auto &framework: pProject->frameworks)
|
||||
{
|
||||
args.AppendTail("-framework");
|
||||
args.AppendTail(framework);
|
||||
}
|
||||
runner->Run(szExePath, args);
|
||||
runner->Wait();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user