Commit 2293c96d authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

Remove fuchsia_sdk:fdio from public_deps in //base

1. Moved fdio to deps instead of public_deps in //base
2. Added direct deps on FDIO in targets that need it, particularly in
   mojo.
3. Also replaces some deps with public_deps in
   //mojo/edk/test:test_support to reflect set of header deps in the
   headers exported by that target.
4. Small cleanups in mojo/edk/BUILD.gn to make it more readable.
5. Updated build/config/fuchsia/BUILD.gn to avoid dependency on
   internals of third_party/fuchsia-sdk/BUILD.gn.

Bug: 707030
Change-Id: I402d3cd0d1d709aa381fa10e6fc6dfdb8e7e060c
Reviewed-on: https://chromium-review.googlesource.com/1052608
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557935}
parent e895d17d
......@@ -1405,12 +1405,12 @@ jumbo_component("base") {
# TODO(https://crbug.com/841171): Move these back to |deps|.
public_deps += [
"//third_party/fuchsia-sdk:async",
"//third_party/fuchsia-sdk:fdio",
"//third_party/fuchsia-sdk:launchpad",
]
deps += [
"//third_party/fuchsia-sdk:async_default",
"//third_party/fuchsia-sdk:fdio",
"//third_party/fuchsia-sdk:fidl",
"//third_party/fuchsia-sdk:svc",
"//third_party/fuchsia-sdk:zx",
......@@ -2620,6 +2620,7 @@ test("base_unittests") {
":test_fidl",
"//third_party/fuchsia-sdk:async",
"//third_party/fuchsia-sdk:async_default",
"//third_party/fuchsia-sdk:fdio",
]
}
......
......@@ -4,6 +4,7 @@
#include "base/message_loop/message_pump_fuchsia.h"
#include <fdio/io.h>
#include <fdio/private.h>
#include <zircon/status.h>
#include <zircon/syscalls.h>
......
......@@ -5,7 +5,6 @@
#ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_FUCHSIA_H_
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_FUCHSIA_H_
#include <fdio/io.h>
#include <lib/async/wait.h>
#include "base/base_export.h"
......
......@@ -56,9 +56,8 @@ config("compiler") {
"-Wl,--as-needed",
]
# The fdio library is always linked (via |ldflags| above) but is not on the
# toolchain default lib_dirs, so add the path. https://crbug.com/731217
configs = [ "//third_party/fuchsia-sdk:sdk_lib_dirs_config" ]
# Add SDK lib dir for -lfdio above.
lib_dirs = [ rebase_path("${fuchsia_sdk}/arch/${current_cpu}/lib") ]
# TODO(crbug.com/821951): Clang enables SafeStack by default when targeting
# Fuchsia, but it breaks some tests, notably in V8.
......
......@@ -106,8 +106,6 @@ template("core_impl_source_set") {
"embedder/scoped_ipc_support.cc",
"system/atomic_flag.h",
"system/broker.h",
"system/broker_host.cc",
"system/broker_host.h",
"system/broker_win.cc",
"system/channel.cc",
"system/channel_win.cc",
......@@ -136,6 +134,12 @@ template("core_impl_source_set") {
"system/watcher_set.h",
]
public_deps = [
"//base",
"//mojo/edk/system/ports",
"//mojo/public/c/system:headers",
]
if (is_fuchsia) {
sources += [
"embedder/named_platform_handle_utils_fuchsia.cc",
......@@ -143,17 +147,20 @@ template("core_impl_source_set") {
"embedder/platform_handle_utils_fuchsia.cc",
"system/channel_fuchsia.cc",
]
} else if (is_posix) {
public += [ "embedder/platform_channel_utils_posix.h" ]
public_deps += [ "//third_party/fuchsia-sdk:fdio" ]
}
if (is_posix) {
sources += [
"embedder/platform_channel_pair_posix.cc",
"embedder/platform_channel_utils_posix.cc",
"embedder/platform_handle_utils_posix.cc",
]
if (!is_nacl || is_nacl_nonsfi) {
public += [ "embedder/platform_channel_utils_posix.h" ]
sources += [
"embedder/platform_channel_utils_posix.cc",
"system/broker_posix.cc",
"system/channel_posix.cc",
]
......@@ -171,10 +178,10 @@ template("core_impl_source_set") {
]
}
if (is_nacl && !is_nacl_nonsfi) {
sources -= [
"embedder/platform_channel_utils_posix.cc",
if (!is_nacl || is_nacl_nonsfi) {
sources += [
"system/broker_host.cc",
"system/broker_host.h",
]
}
......@@ -183,12 +190,6 @@ template("core_impl_source_set") {
defines += [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ]
}
public_deps = [
"//base",
"//mojo/edk/system/ports",
"//mojo/public/c/system:headers",
]
deps = []
if (is_android) {
deps += [ "//third_party/ashmem" ]
......
......@@ -24,7 +24,7 @@ static_library("test_support") {
sources += [ "test_utils_posix.cc" ]
}
deps = [
public_deps = [
"//base",
"//base/test:test_support",
"//mojo/edk",
......
......@@ -7,6 +7,7 @@ assert(is_fuchsia)
import("fuchsia_sdk_pkg.gni")
config("sdk_lib_dirs_config") {
visibility = [ ":*" ]
lib_dirs = [ "sdk/arch/${target_cpu}/lib" ]
}
......
......@@ -102,7 +102,10 @@ source_set("gtest") {
"//base",
]
if (is_fuchsia) {
deps += [ "//third_party/fuchsia-sdk:launchpad" ]
deps += [
"//third_party/fuchsia-sdk:fdio",
"//third_party/fuchsia-sdk:launchpad",
]
}
}
}
......
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