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

Stubbed out linking on Fuchsia

Follows https://codereview.chromium.org/2931143002/. Sufficient to link
d8 with target_os="fuchsia" in Chrome. No implementations of platform
functions yet, just stubs.

BUG=chromium:731217

Review-Url: https://codereview.chromium.org/2932053004
Cr-Commit-Position: refs/heads/master@{#45832}
parent c72a6126
...@@ -2597,6 +2597,11 @@ v8_component("v8_libbase") { ...@@ -2597,6 +2597,11 @@ v8_component("v8_libbase") {
"src/base/platform/platform-linux.cc", "src/base/platform/platform-linux.cc",
] ]
} }
} else if (is_fuchsia) {
sources += [
"src/base/debug/stack_trace_fuchsia.cc",
"src/base/platform/platform-fuchsia.cc",
]
} else if (is_mac) { } else if (is_mac) {
sources += [ sources += [
"src/base/debug/stack_trace_posix.cc", "src/base/debug/stack_trace_posix.cc",
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/base/debug/stack_trace.h"
#include <iomanip>
#include <ostream>
#include "src/base/platform/platform.h"
namespace v8 {
namespace base {
namespace debug {
bool EnableInProcessStackDumping() {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
void DisableSignalStackDump() {}
StackTrace::StackTrace() {}
void StackTrace::Print() const {
std::string backtrace = ToString();
OS::Print("%s\n", backtrace.c_str());
}
void StackTrace::OutputToStream(std::ostream* os) const {
for (size_t i = 0; i < count_; ++i) {
*os << "#" << std::setw(2) << i << trace_[i] << "\n";
}
}
} // namespace debug
} // namespace base
} // namespace v8
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/base/macros.h"
#include "src/base/platform/platform-posix.h"
#include "src/base/platform/platform.h"
namespace v8 {
namespace base {
TimezoneCache* OS::CreateTimezoneCache() { return new PosixTimezoneCache(); }
std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return std::vector<SharedLibraryAddress>();
}
void OS::SignalCodeMovingGC() {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
}
VirtualMemory::VirtualMemory() : address_(NULL), size_(0) {}
VirtualMemory::VirtualMemory(size_t size)
: address_(ReserveRegion(size)), size_(size) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
}
VirtualMemory::VirtualMemory(size_t size, size_t alignment)
: address_(NULL), size_(0) {}
VirtualMemory::~VirtualMemory() {}
bool VirtualMemory::IsReserved() { return false; }
void VirtualMemory::Reset() {}
bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
return false;
}
bool VirtualMemory::Uncommit(void* address, size_t size) { return false; }
bool VirtualMemory::Guard(void* address) { return false; }
// static
void* VirtualMemory::ReserveRegion(size_t size) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return NULL;
}
// static
bool VirtualMemory::CommitRegion(void* base, size_t size, bool is_executable) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
// static
bool VirtualMemory::UncommitRegion(void* base, size_t size) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
// static
bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
void* free_start, size_t free_size) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
// static
bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
// static
bool VirtualMemory::HasLazyCommits() {
CHECK(false); // TODO(fuchsia): Port, https://crbug.com/731217.
return false;
}
} // namespace base
} // namespace v8
...@@ -2203,6 +2203,12 @@ ...@@ -2203,6 +2203,12 @@
'base/platform/platform-posix.cc' 'base/platform/platform-posix.cc'
]}, ]},
], ],
['OS=="fuchsia"', {
'sources': [
'base/debug/stack_trace_fuchsia.cc',
'base/platform/platform-fuchsia.cc',
]},
],
['OS=="solaris"', { ['OS=="solaris"', {
'link_settings': { 'link_settings': {
'libraries': [ 'libraries': [
......
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