Commit c72a6126 authored by scottmg's avatar scottmg Committed by Commit Bot

Basic compilation on Fuchsia

Sufficient to compile //v8 in Chrome with target_os="fuchsia". Doesn't
link yet, due to missing implementations (primarily VirtualMemory, as
well as a few utility functions).

BUG=chromium:731217
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.chromium.org/2931143002
Cr-Commit-Position: refs/heads/master@{#45831}
parent 710229e5
......@@ -61,6 +61,7 @@
// V8_OS_CYGWIN - Cygwin
// V8_OS_DRAGONFLYBSD - DragonFlyBSD
// V8_OS_FREEBSD - FreeBSD
// V8_OS_FUCHSIA - Fuchsia
// V8_OS_LINUX - Linux
// V8_OS_MACOSX - Mac OS X
// V8_OS_NETBSD - NetBSD
......@@ -95,6 +96,9 @@
# define V8_OS_BSD 1
# define V8_OS_FREEBSD 1
# define V8_OS_POSIX 1
#elif defined(__Fuchsia__)
# define V8_OS_FUCHSIA 1
# define V8_OS_POSIX 1
#elif defined(__DragonFly__)
# define V8_OS_BSD 1
# define V8_OS_DRAGONFLYBSD 1
......
......@@ -362,6 +362,8 @@ int OS::GetCurrentThreadId() {
return static_cast<int>(gettid());
#elif V8_OS_AIX
return static_cast<int>(thread_self());
#elif V8_OS_FUCHSIA
return static_cast<int>(pthread_self());
#elif V8_OS_SOLARIS
return static_cast<int>(pthread_self());
#else
......
......@@ -415,7 +415,7 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
#if !(V8_OS_OPENBSD || (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_S390)))
mcontext_t& mcontext = ucontext->uc_mcontext;
#endif
#if V8_OS_LINUX
#if V8_OS_LINUX || V8_OS_FUCHSIA
#if V8_HOST_ARCH_IA32
state->pc = reinterpret_cast<void*>(mcontext.gregs[REG_EIP]);
state->sp = reinterpret_cast<void*>(mcontext.gregs[REG_ESP]);
......
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