Skip to content

Commit

Permalink
fuchsia: Add dependency on //headless to get headless_shell target
Browse files Browse the repository at this point in the history
This lets gn generate build files that contain headless_shell as a
target, but there's still lots of porting to be done to get it to
actually build.

Dependencies on crash reporting are excluded, as it is expected
that a shipping product would rely on the Fuchsia system crash
reporter, so Chrome itself does not need a separate one.

Bug: 746674, 753619
Change-Id: Id63ebeb1ed8e3a927e6ac8b368f89c9c010d440f
Reviewed-on: https://chromium-review.googlesource.com/608810
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493794}
  • Loading branch information
sgraham committed Aug 11, 2017
1 parent 2579468 commit f24e374
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,10 @@ group("gn_all") {
deps += [ "//tools/perf/contrib/vr_benchmarks:vr_perf_tests" ]
}
}

if (is_fuchsia) {
deps += [ "//headless" ]
}
}

# TODO(GYP_GONE): This target exists for compatibility with GYP, specifically
Expand Down
33 changes: 25 additions & 8 deletions headless/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ js_library("js_devtools_bindings_lib") {
extra_deps = [ ":gen_devtools_client_api" ]
}

if (headless_fontconfig_utils) {
if (headless_fontconfig_utils && !is_fuchsia) {
static_library("headless_fontconfig_utils") {
sources = [
"public/util/fontconfig.cc",
Expand Down Expand Up @@ -280,8 +280,6 @@ component("headless") {
"lib/browser/headless_window_tree_host.h",
"lib/headless_content_client.cc",
"lib/headless_content_client.h",
"lib/headless_crash_reporter_client.cc",
"lib/headless_crash_reporter_client.h",
"public/headless_browser.cc",
"public/headless_browser.h",
"public/headless_browser_context.h",
Expand Down Expand Up @@ -323,6 +321,13 @@ component("headless") {
"public/util/user_agent.h",
]

if (!is_fuchsia) {
sources += [
"lib/headless_crash_reporter_client.cc",
"lib/headless_crash_reporter_client.h",
]
}

sources += generated_devtools_api

if (use_aura) {
Expand Down Expand Up @@ -391,11 +396,14 @@ component("headless") {
]

deps += [
"//components/crash/content/browser",
"//components/security_state/content",
"//third_party/WebKit/public:blink_headers",
]

if (!is_fuchsia) {
deps += [ "//components/crash/content/browser" ]
}

if (enable_basic_printing) {
deps += [
"//components/printing/browser",
Expand Down Expand Up @@ -431,7 +439,7 @@ component("headless") {
deps += [ "//ui/ozone" ]
}

if (headless_fontconfig_utils) {
if (headless_fontconfig_utils && !is_fuchsia) {
deps += [ ":headless_fontconfig_utils" ]
}

Expand Down Expand Up @@ -510,7 +518,6 @@ test("headless_unittests") {
":headless_renderer",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//components/crash/content/browser",
"//components/security_state/content",
"//content/public/app:both",
"//content/public/child:child",
Expand All @@ -519,6 +526,10 @@ test("headless_unittests") {
"//testing/gtest",
]

if (!is_fuchsia) {
deps += [ "//components/crash/content/browser" ]
}

if (enable_basic_printing) {
sources += [ "lib/browser/headless_printing_unittest.cc" ]
deps += [ "//components/printing/browser" ]
Expand Down Expand Up @@ -655,13 +666,16 @@ test("headless_browsertests") {
deps = [
":headless_renderer",
"//base",
"//components/crash/content/browser",
"//components/security_state/content",
"//content/test:test_support",
"//testing/gmock",
"//testing/gtest",
]

if (!is_fuchsia) {
deps += [ "//components/crash/content/browser" ]
}

# Only include this if we built the js_binary
if (is_linux) {
data += [ "$root_out_dir/headless_browser_tests.pak" ]
Expand Down Expand Up @@ -774,14 +788,17 @@ static_library("headless_shell_lib") {

deps = [
":headless_renderer",
"//components/crash/content/browser",
"//components/security_state/content",
"//content/public/app:both",
"//content/public/browser",
"//content/public/child:child",
"//content/public/common",
]

if (!is_fuchsia) {
deps += [ "//components/crash/content/browser" ]
}

if (enable_basic_printing) {
deps += [
"//components/printing/browser",
Expand Down

0 comments on commit f24e374

Please sign in to comment.