Moved comments into platform specific compiler directive sections.

This commit is contained in:
Steve
2021-09-20 15:48:15 +01:00
parent 8ec6511743
commit 20f54bc252

View File

@@ -61,21 +61,16 @@ void wasmtime_longjmp(void *JmpBuf) {
platform_longjmp(*buf, 1); platform_longjmp(*buf, 1);
} }
// Just in case cross-language LTO is enabled we set the `noinline` attribute
// and also try to have some sort of side effect in this function with a dummy
// `asm` statement.
//
// 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
// matter.
#ifdef CFG_TARGET_OS_windows #ifdef CFG_TARGET_OS_windows
// export required for external access. // export required for external access.
__declspec(dllexport) __declspec(dllexport)
#else #else
// 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
// matter.
// Just in case cross-language LTO is enabled we set the `noinline` attribute
// and also try to have some sort of side effect in this function with a dummy
// `asm` statement.
__attribute__((weak, noinline)) __attribute__((weak, noinline))
#endif #endif
void __jit_debug_register_code() { void __jit_debug_register_code() {
@@ -91,13 +86,13 @@ struct JITDescriptor {
void* first_entry_; void* first_entry_;
}; };
// 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
// important.
#ifdef CFG_TARGET_OS_windows #ifdef CFG_TARGET_OS_windows
// export required for external access. // export required for external access.
__declspec(dllexport) __declspec(dllexport)
#else #else
// 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
// important.
__attribute__((weak)) __attribute__((weak))
#endif #endif
struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL}; struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL};