MCPcopy Create free account
hub / github.com/beefytech/Beef / main

Function main

BeefLink/BeefLink.cpp:297–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297int main(int argc, char* argv[])
298{
299 int startTick = GetTickCount();
300
301 blContext = BlContext_Create();
302
303 // C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\proj\TestCPP\x64\Debug\TestCPP.exe" /INCREMENTAL /NOLOGO /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\proj\TestCPP\x64\Debug\TestCPP.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\proj\TestCPP\x64\Debug\TestCPP.lib" /MACHINE:X64 kernel32.lib user32.lib advapi32.lib shell32.lib x64\Debug\main.obj
304
305 bool success = true;
306
307 for (int argIdx = 0; argIdx < argc; argIdx++)
308 {
309 if (!HandleParam(argv[argIdx], argIdx == 0))
310 break;
311 }
312
313 if (gFailed)
314 success = false;
315
316 if (success)
317 {
318 BlContext_Init(blContext, true, true);
319 for (auto fileName : fileNames)
320 BlContext_AddFile(blContext, fileName.c_str());
321 // Process DEF first. Relies on LIFO ordering
322 if (!defFileName.empty())
323 BlContext_AddFile(blContext, defFileName.c_str());
324
325 success &= BlContext_Link(blContext);
326 }
327 BlContext_Delete(blContext);
328
329 printf("Total Time: %dms\n", GetTickCount() - startTick);
330
331 if (success)
332 return 0;
333 return 2;
334}

Callers

nothing calls this directly

Calls 7

HandleParamFunction · 0.85
BlContext_InitFunction · 0.85
BlContext_AddFileFunction · 0.85
BlContext_LinkFunction · 0.85
BlContext_DeleteFunction · 0.85
c_strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected