improvements on fpc
This commit is contained in:
@@ -139,14 +139,14 @@ CUtlString CClangLinker::Link( LinkProject_t *pProject )
|
||||
}
|
||||
else if (pProject->m_target.kernel == TARGET_KERNEL_ANDROID)
|
||||
{
|
||||
args.AppendTail(CUtlString("--sysroot=%s/sysroot", pProject->m_target.szSysroot));
|
||||
// args.AppendTail(CUtlString("--sysroot=%s/sysroot", pProject->m_target.szSysroot));
|
||||
|
||||
// Shouldn't be here ?
|
||||
args.AppendTail("-static-libstdc++");
|
||||
}
|
||||
else if (pProject->m_target.szSysroot)
|
||||
{
|
||||
args.AppendTail(CUtlString("--sysroot=%s", pProject->m_target.szSysroot));
|
||||
// args.AppendTail(CUtlString("--sysroot=%s", pProject->m_target.szSysroot));
|
||||
}
|
||||
|
||||
// Magic for the systems
|
||||
@@ -201,18 +201,34 @@ CUtlString CClangLinker::Link( LinkProject_t *pProject )
|
||||
args.AppendTail(framework);
|
||||
}
|
||||
|
||||
// Android SDK requires sysroot
|
||||
if (pProject->m_target.kernel == TARGET_KERNEL_ANDROID)
|
||||
{
|
||||
if (!pProject->m_target.szSysroot)
|
||||
Plat_FatalErrorFunc("szSysroot must be specified for android\n");
|
||||
runner->Run(CUtlString("%s/bin/clang++",pProject->m_target.szSysroot), args);
|
||||
IINISection *pSection = NULL;
|
||||
const char *szLinker;
|
||||
const char *szSysroot;
|
||||
if (!g_pConfig)
|
||||
goto use_default_linker;
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
pSection = g_pConfig->GetSection(pProject->m_target.GetTriplet());
|
||||
if (!pSection)
|
||||
goto use_default_linker;
|
||||
szSysroot = pSection->GetStringValue("sysroot");
|
||||
if (szSysroot)
|
||||
{
|
||||
runner->Run("clang++", args);
|
||||
args.AppendTail("--sysroot");
|
||||
args.AppendTail(szSysroot);
|
||||
}
|
||||
|
||||
szLinker = pSection->GetStringValue("CLANG_LINKER_INTERFACE_NAME");
|
||||
if (szLinker)
|
||||
{
|
||||
runner->Run(szLinker, args);
|
||||
}
|
||||
|
||||
runner->Wait();
|
||||
|
||||
goto compiled;
|
||||
use_default_linker:
|
||||
runner->Run("clang++", args);
|
||||
runner->Wait();
|
||||
}
|
||||
compiled:
|
||||
|
||||
Reference in New Issue
Block a user