Exports symbols to be shared with external GDB/JIT debugging interface tools.
Windows O/S specific requirement.
This commit is contained in:
@@ -68,7 +68,14 @@ void wasmtime_longjmp(void *JmpBuf) {
|
|||||||
// Note the `weak` linkage here, though, which is intended to let other code
|
// Note the `weak` linkage here, though, which is intended to let other code
|
||||||
// override this symbol if it's defined elsewhere, since this definition doesn't
|
// override this symbol if it's defined elsewhere, since this definition doesn't
|
||||||
// matter.
|
// matter.
|
||||||
#ifndef CFG_TARGET_OS_windows
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CFG_TARGET_OS_windows
|
||||||
|
// export required for external access.
|
||||||
|
__declspec(dllexport)
|
||||||
|
#else
|
||||||
__attribute__((weak, noinline))
|
__attribute__((weak, noinline))
|
||||||
#endif
|
#endif
|
||||||
void __jit_debug_register_code() {
|
void __jit_debug_register_code() {
|
||||||
@@ -87,11 +94,16 @@ struct JITDescriptor {
|
|||||||
// Note the `weak` linkage here which is the same purpose as above. We want to
|
// Note the `weak` linkage here which is the same purpose as above. We want to
|
||||||
// let other runtimes be able to override this since our own definition isn't
|
// let other runtimes be able to override this since our own definition isn't
|
||||||
// important.
|
// important.
|
||||||
#ifndef CFG_TARGET_OS_windows
|
#ifdef CFG_TARGET_OS_windows
|
||||||
|
// export required for external access.
|
||||||
|
__declspec(dllexport)
|
||||||
|
#else
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
#endif
|
#endif
|
||||||
struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL};
|
struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct JITDescriptor* wasmtime_jit_debug_descriptor() {
|
struct JITDescriptor* wasmtime_jit_debug_descriptor() {
|
||||||
return &__jit_debug_descriptor;
|
return &__jit_debug_descriptor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user