mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Jit api versioning (#2514)
This commit is contained in:
parent
94c0d18d49
commit
43c02cecc0
5 changed files with 47 additions and 15 deletions
|
@ -16,6 +16,12 @@
|
|||
|
||||
struct Context;
|
||||
|
||||
#define MAKE_JIT_API_CALL_IMPL(prefix, version) prefix##version
|
||||
#define MAKE_JIT_API_CALL(prefix, version) \
|
||||
MAKE_JIT_API_CALL_IMPL(prefix, version)
|
||||
#define JIT_API_ENTRYPOINT MAKE_JIT_API_CALL(rtCompileProcessImplSo, \
|
||||
LDC_DYNAMIC_COMPILE_API_VERSION)
|
||||
|
||||
extern "C" {
|
||||
|
||||
// Silence missing-variable-declaration clang warning
|
||||
|
@ -25,11 +31,11 @@ const void *dynamiccompile_modules_head = nullptr;
|
|||
#ifdef _WIN32
|
||||
__declspec(dllimport)
|
||||
#endif
|
||||
extern void rtCompileProcessImplSo(const void *modlist_head,
|
||||
const Context *context,
|
||||
std::size_t contextSize);
|
||||
extern void JIT_API_ENTRYPOINT(const void *modlist_head,
|
||||
const Context *context,
|
||||
std::size_t contextSize);
|
||||
|
||||
void rtCompileProcessImpl(const Context *context, std::size_t contextSize) {
|
||||
rtCompileProcessImplSo(dynamiccompile_modules_head, context, contextSize);
|
||||
JIT_API_ENTRYPOINT(dynamiccompile_modules_head, context, contextSize);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue