diff --git a/crates/runtime/src/helpers.c b/crates/runtime/src/helpers.c index 5778280488..66b87a150b 100644 --- a/crates/runtime/src/helpers.c +++ b/crates/runtime/src/helpers.c @@ -61,21 +61,16 @@ void wasmtime_longjmp(void *JmpBuf) { 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 // export required for external access. __declspec(dllexport) #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)) #endif void __jit_debug_register_code() { @@ -91,14 +86,14 @@ struct JITDescriptor { 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 // export required for external access. -__declspec(dllexport) + __declspec(dllexport) #else -__attribute__((weak)) + // 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)) #endif struct JITDescriptor __jit_debug_descriptor = {1, 0, NULL, NULL};