Compiles a plugin to a dynamic library. More...
#include <Plugin.h>
Public Types | |
enum class | Type { ClangCompiler , GnuCompiler , MicrosoftCompiler } |
Compiler type (clang/gcc/msvc) More... | |
Public Member Functions | |
Result | compile (const PluginDefinition &definition, const PluginSysroot &sysroot, const PluginCompilerEnvironment &environment, String &compilerLog) const |
Compiles a Definition to an object file. More... | |
Result | link (const PluginDefinition &definition, const PluginSysroot &sysroot, const PluginCompilerEnvironment &environment, StringView executablePath, String &linkerLog) const |
Links a Definition into a dynamic library, with symbols from executablePath More... | |
Static Public Member Functions | |
static Result | findBestCompiler (PluginCompiler &compiler) |
Look for best compiler on current system. More... | |
Public Attributes | |
Type | type = Type::ClangCompiler |
Compile Type. More... | |
StringNative< 256 > | compilerPath = StringEncoding::Native |
Path to the compiler. More... | |
StringNative< 256 > | linkerPath = StringEncoding::Native |
Path to the linker. More... | |
SmallVector< StringNative< 256 >, 8 > | includePaths |
Path to include directories used to compile plugin. More... | |
SmallVector< StringNative< 256 >, 8 > | compilerIncludePaths |
Path to compiler include directories. More... | |
SmallVector< StringNative< 256 >, 8 > | compilerLibraryPaths |
Path to compiler library directories. More... | |
Compiles a plugin to a dynamic library.
|
strong |
Compiler type (clang/gcc/msvc)
Result SC::PluginCompiler::compile | ( | const PluginDefinition & | definition, |
const PluginSysroot & | sysroot, | ||
const PluginCompilerEnvironment & | environment, | ||
String & | compilerLog | ||
) | const |
Compiles a Definition to an object file.
definition | A valid Definition parsed by Definition::parse |
sysroot | A sysroot used (if requested) holding include / library paths to libc/libc++ |
environment | An environment used to populate CFLAGS and LDFLAGS from environment variables |
compilerLog | If provided, will receive the log output produced by the compiler |
|
static |
Look for best compiler on current system.
[out] | compiler | Best compiler found |
Result SC::PluginCompiler::link | ( | const PluginDefinition & | definition, |
const PluginSysroot & | sysroot, | ||
const PluginCompilerEnvironment & | environment, | ||
StringView | executablePath, | ||
String & | linkerLog | ||
) | const |
Links a Definition into a dynamic library, with symbols from executablePath
definition | A valid Definition already compiled with PluginCompiler::compile |
sysroot | A sysroot used (if requested) holding include / library paths to libc/libc++ |
environment | An environment used to populate CFLAGS and LDFLAGS from environment variables |
executablePath | Path to the executable loading the given plugin, exposing symbols used by Plugin |
linkerLog | If provided, will receive the log output produced by the linker |
SmallVector<StringNative<256>, 8> SC::PluginCompiler::compilerIncludePaths |
Path to compiler include directories.
SmallVector<StringNative<256>, 8> SC::PluginCompiler::compilerLibraryPaths |
Path to compiler library directories.
StringNative<256> SC::PluginCompiler::compilerPath = StringEncoding::Native |
Path to the compiler.
SmallVector<StringNative<256>, 8> SC::PluginCompiler::includePaths |
Path to include directories used to compile plugin.
StringNative<256> SC::PluginCompiler::linkerPath = StringEncoding::Native |
Path to the linker.
Type SC::PluginCompiler::type = Type::ClangCompiler |
Compile Type.