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, Span< char > &compilerLog) const |
| Compiles a Definition to an object file. | |
| Result | link (const PluginDefinition &definition, const PluginSysroot &sysroot, const PluginCompilerEnvironment &environment, StringView executablePath, Span< char > &linkerLog) const |
Links a Definition into a dynamic library, with symbols from executablePath | |
Static Public Member Functions | |
| static Result | findBestCompiler (PluginCompiler &compiler) |
| Look for best compiler on current system. | |
Public Attributes | |
| Type | type = Type::ClangCompiler |
| Compile Type. | |
| StringPath | compilerPath |
| Path to the compiler. | |
| StringPath | linkerPath |
| Path to the linker. | |
| FixedVector< StringPath, 8 > | includePaths |
| Path to include directories used to compile plugin. | |
| FixedVector< StringPath, 8 > | compilerIncludePaths |
| Path to compiler include directories. | |
| FixedVector< StringPath, 8 > | compilerLibraryPaths |
| Path to compiler library directories. | |
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, | ||
| Span< char > & | 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 |
|
staticnodiscard |
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, | ||
| Span< char > & | 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 |
| FixedVector<StringPath, 8> SC::PluginCompiler::compilerIncludePaths |
Path to compiler include directories.
| FixedVector<StringPath, 8> SC::PluginCompiler::compilerLibraryPaths |
Path to compiler library directories.
| StringPath SC::PluginCompiler::compilerPath |
Path to the compiler.
| FixedVector<StringPath, 8> SC::PluginCompiler::includePaths |
Path to include directories used to compile plugin.
| StringPath SC::PluginCompiler::linkerPath |
Path to the linker.
| Type SC::PluginCompiler::type = Type::ClangCompiler |
Compile Type.