Skip to content

Commit

Permalink
[fuchsia] Rename fuchsia_package() rule to cr_fuchsia_package().
Browse files Browse the repository at this point in the history
Fuchsia's SDK will soon provide GN rules include one for declaring
fuchsia package targets. Since the SDK-provided rule works differently
from the Chromium one but is called fuchsia_package(), we need to rename
the Chromium rule to avoid them clashing.

Bug: 1050703
Change-Id: I08c14069d98df07f78e9ef25bc2c234a825d5ebb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2047033
Auto-Submit: Wez <wez@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740324}
  • Loading branch information
Wez authored and Commit Bot committed Feb 11, 2020
1 parent 1fa608f commit abe2d75
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ if ((is_linux || is_win) && enable_remoting && !use_ozone) {
if (is_fuchsia) {
# TODO(https://crbug.com/731217): This can't practically be in //v8 without
# duplicating all the Fuchsia running infrastructure there.
fuchsia_package("d8_fuchsia_pkg") {
cr_fuchsia_package("d8_fuchsia_pkg") {
testonly = true
binary = "//v8:d8"
package_name_override = "d8"
Expand Down
12 changes: 11 additions & 1 deletion build/config/fuchsia/package.gni
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import("//build/config/sysroot.gni")
# component_name_override: If set, specifies the name of the component.
# By default, the component name is the same as the package name.
# deps: Additional targets to build and include in the package (optional).
template("fuchsia_package") {
#
# TODO(https://crbug.com/1050703): Migrate consumers to GN SDK equivalents.
template("cr_fuchsia_package") {
pkg = {
forward_variables_from(invoker, "*")

Expand Down Expand Up @@ -234,3 +236,11 @@ template("fuchsia_package") {
outputs = [ _final_far_file ]
}
}

# TODO(https:crbug.com/1050703): Migrate callers to cr_fuchsia_package() and
# remove this old name.
template("fuchsia_package") {
cr_fuchsia_package(target_name) {
forward_variables_from(invoker, "*")
}
}
2 changes: 1 addition & 1 deletion content/shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ if (is_android) {
}

if (is_fuchsia) {
fuchsia_package("content_shell_pkg") {
cr_fuchsia_package("content_shell_pkg") {
testonly = true
binary = ":content_shell"
package_name_override = "content_shell"
Expand Down
4 changes: 2 additions & 2 deletions fuchsia/engine/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ executable("web_engine_exe") {
visibility = [ ":*" ]
}

fuchsia_package("web_engine") {
cr_fuchsia_package("web_engine") {
binary = ":web_engine_exe"
manifest = "context_provider.cmx"
component_name_override = "context_provider"
Expand Down Expand Up @@ -326,7 +326,7 @@ test("web_engine_integration_tests") {
] ]
}

fuchsia_package("web_engine_shell_pkg") {
cr_fuchsia_package("web_engine_shell_pkg") {
testonly = true
manifest = "test/web_engine_shell.cmx"
binary = ":web_engine_shell_exec"
Expand Down
2 changes: 1 addition & 1 deletion fuchsia/http/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ executable("http_exe") {
visibility = [ ":*" ]
}

fuchsia_package("http_pkg") {
cr_fuchsia_package("http_pkg") {
binary = ":http_exe"
package_name_override = "http"
manifest = "http.cmx"
Expand Down
4 changes: 2 additions & 2 deletions fuchsia/runners/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ executable("cast_runner_exe") {
visibility = [ ":*" ]
}

fuchsia_package("cast_runner_pkg") {
cr_fuchsia_package("cast_runner_pkg") {
binary = ":cast_runner_exe"
package_name_override = _cast_runner_package_name
archive_name_override = "cast_runner"
Expand Down Expand Up @@ -198,7 +198,7 @@ executable("web_runner_exe") {
visibility = [ ":*" ]
}

fuchsia_package("web_runner_pkg") {
cr_fuchsia_package("web_runner_pkg") {
binary = ":web_runner_exe"
package_name_override = _web_runner_package_name
component_name_override = "web_runner"
Expand Down
2 changes: 1 addition & 1 deletion headless/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ jumbo_static_library("headless_shell_lib") {
}

if (is_fuchsia) {
fuchsia_package("headless_shell_pkg") {
cr_fuchsia_package("headless_shell_pkg") {
binary = ":headless_shell"
package_name_override = "headless_shell"
manifest = "//build/config/fuchsia/tests.cmx"
Expand Down
2 changes: 1 addition & 1 deletion testing/test.gni
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ template("test") {
deps = [ "//testing/buildbot/filters:fuchsia_filters" ]
}

fuchsia_package(_pkg_target) {
cr_fuchsia_package(_pkg_target) {
testonly = true
forward_variables_from(invoker, [ "manifest" ])
binary = ":$_exec_target"
Expand Down
2 changes: 1 addition & 1 deletion ui/ozone/demo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ executable("skia_demo") {
}

if (is_fuchsia) {
fuchsia_package("ozone_demo_pkg") {
cr_fuchsia_package("ozone_demo_pkg") {
testonly = true
binary = ":ozone_demo"
package_name_override = "ozone_demo"
Expand Down

0 comments on commit abe2d75

Please sign in to comment.