Commit 0822e7c7 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Fix "multiple rules generate ..." warning when using multiple toolchains

The target //third_party/test_fonts copy the files to the same location
for all toolchains, so when using multiple toolchains (which is common
when targeting iOS) and multiple toolchains depends on that target (it
can happen when building cronet), ninja presents a warning because some
files are copied to the same location.

Change the target to copy the files to $root_out_dir instead of
$root_build_dir which correspond to the same directory for the default
toolchain but to a toolchain specific directory for the secondary
toolchains (this is consistent with the other target that copy fonts
defined in //skia).

Also fix iOS build to also use a bundle for the fonts (since iOS apps
cannot access file outside of the application bundle).

Bug: none
Change-Id: Ic5e3290a495f67744f9d676800e16612ffefcbc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992428Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarStephen White <senorblanco@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730182}
parent bb67763b
...@@ -844,7 +844,7 @@ if (is_fuchsia) { ...@@ -844,7 +844,7 @@ if (is_fuchsia) {
] ]
} }
} }
if (is_mac) { if (is_mac || is_ios) {
bundle_data("test_fonts_bundle_data") { bundle_data("test_fonts_bundle_data") {
public_deps = [ public_deps = [
"//third_party/test_fonts", "//third_party/test_fonts",
...@@ -865,7 +865,7 @@ group("test_fonts_resources") { ...@@ -865,7 +865,7 @@ group("test_fonts_resources") {
deps = [] deps = []
data_deps = [] data_deps = []
if (is_mac) { if (is_mac || is_ios) {
deps += [ ":test_fonts_bundle_data" ] deps += [ ":test_fonts_bundle_data" ]
data_deps += [ ":test_fonts_bundle_data" ] data_deps += [ ":test_fonts_bundle_data" ]
} else { } else {
......
...@@ -36,6 +36,6 @@ copy("test_fonts") { ...@@ -36,6 +36,6 @@ copy("test_fonts") {
] ]
outputs = [ outputs = [
"${root_build_dir}/test_fonts/{{source_file_part}}", "$root_out_dir/test_fonts/{{source_file_part}}",
] ]
} }
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