[fuchsia] Migrate to lib/sys/cpp

We now use lib/sys/cpp, which is part of the Fuchsia SDK, rather than
lib/component/cpp, which is being deleted.

Change-Id: I3eaae74cc0403923886f9872d4327e46ec8915c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95700
Auto-Submit: Adam Barth <abarth@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This commit is contained in:
Adam Barth 2019-03-06 21:16:30 +00:00 committed by commit-bot@chromium.org
parent 995b1c9adc
commit 6988347b53
2 changed files with 5 additions and 10 deletions

View file

@ -64,7 +64,7 @@ library_for_all_configs("libdart_vm") {
extra_deps = [
# TODO(US-399): Remove time_service specific code when it is no longer
# necessary.
"//garnet/public/lib/component/cpp",
"//sdk/lib/sys/cpp",
"//sdk/fidl/fuchsia.timezone",
"//zircon/public/lib/fbl",

View file

@ -8,17 +8,14 @@
#include "vm/os.h"
#include <errno.h>
#include <fuchsia/timezone/cpp/fidl.h>
#include <lib/fdio/util.h>
#include <lib/sys/cpp/service_directory.h>
#include <zircon/process.h>
#include <zircon/syscalls.h>
#include <zircon/syscalls/object.h>
#include <zircon/types.h>
#include <fuchsia/timezone/cpp/fidl.h>
#include "lib/component/cpp/startup_context.h"
#include "lib/svc/cpp/services.h"
#include "platform/assert.h"
#include "vm/zone.h"
@ -256,10 +253,8 @@ void OS::PrintErr(const char* format, ...) {
}
void OS::Init() {
auto environment_services = std::make_shared<component::Services>();
auto env_service_root = component::subtle::CreateStaticServiceRootHandle();
environment_services->Bind(std::move(env_service_root));
environment_services->ConnectToService(tz.NewRequest());
auto services = sys::ServiceDirectory::CreateFromNamespace();
services->Connect(tz.NewRequest());
}
void OS::Cleanup() {}