Commit d3e40641 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix linking issues in component builds

Building on linux x64 with "is_component_build = true" currently fails
with linker errors (undefined references). This CL fixes that.

R=ahaas@chromium.org
TBR=mseaborn@chromium.org,mark@chromium.org

Bug: v8:8532
Change-Id: I6b32c00bd974a22268ad1f161ce06a9ebe47c805
Reviewed-on: https://chromium-review.googlesource.com/c/1356505Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57960}
parent ff2d913d
......@@ -7,6 +7,8 @@
#include <signal.h>
#include "include/v8config.h"
namespace v8 {
/**
* This function determines whether a memory access violation has been an
......@@ -22,8 +24,8 @@ namespace v8 {
* \param context A pointer to a ucontext_t struct provided to the signal
* handler.
*/
bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info,
void* context);
V8_EXPORT bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info,
void* context);
} // namespace v8
#endif // V8_WASM_TRAP_HANDLER_POSIX_H_
......@@ -234,6 +234,8 @@ void ReleaseHandlerData(int index) {
free(data);
}
int* GetThreadInWasmThreadLocalAddress() { return &g_thread_in_wasm_code; }
size_t GetRecoveredTrapCount() {
return gRecoveredTrapCount.load(std::memory_order_relaxed);
}
......
......@@ -79,9 +79,7 @@ extern THREAD_LOCAL int g_thread_in_wasm_code;
// Return the address of the thread-local {g_thread_in_wasm_code} variable. This
// pointer can be accessed and modified as long as the thread calling this
// function exists. Only use if from the same thread do avoid race conditions.
inline V8_EXPORT_PRIVATE int* GetThreadInWasmThreadLocalAddress() {
return &g_thread_in_wasm_code;
}
V8_NOINLINE V8_EXPORT_PRIVATE int* GetThreadInWasmThreadLocalAddress();
// On Windows, asan installs its own exception handler which maps shadow
// memory. Since our exception handler may be executed before the asan exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment