MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / compile

Method compile

Libraries/Plugin/Plugin.cpp:593–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593SC::Result SC::PluginCompiler::compile(const PluginDefinition& plugin, const PluginSysroot& sysroot,
594 const PluginCompilerEnvironment& compilerEnvironment,
595 Span<char>& standardOutput) const
596{
597 // TODO: Spawn parallel tasks
598 StringPath destFile;
599 for (auto& file : plugin.files)
600 {
601 StringSpan outputName = PluginString::basename(file.absolutePath.view(), SC_NATIVE_STR(".cpp"));
602 SC_TRY(PluginString::join(destFile, {plugin.directory.view(), outputName}));
603 SC_TRY(destFile.append(SC_NATIVE_STR(".o")));
604 SC_TRY(compileFile(plugin, sysroot, compilerEnvironment, file.absolutePath.view(), destFile.view(),
605 standardOutput));
606 }
607 return Result(true);
608}
609
610SC::Result SC::PluginCompiler::link(const PluginDefinition& definition, const PluginSysroot& sysroot,
611 const PluginCompilerEnvironment& compilerEnvironment, StringSpan executablePath,

Callers 3

PluginTestMethod · 0.45
build_dependency_mapFunction · 0.45
loadMethod · 0.45

Calls 5

basenameFunction · 0.85
joinFunction · 0.50
ResultClass · 0.50
viewMethod · 0.45
appendMethod · 0.45

Tested by 1

PluginTestMethod · 0.36