Commit 359df9c9 authored by jshin's avatar jshin Committed by Commit bot

Fix GN build on mac with icu_use_data_file = false

Several BUILD.gn files were bundling icudtl.dat even when
icu_use_data_file = false (i.e. icudata is statically linked).

The TEST below was done with https://codereview.chromium.org/2174993002/ on
the ICU side. This CL still can get in without that change, though.

BUG=630929
TEST='gn args <outdir>' with icu_use_data_file=false generates ninja files.
TEST=chrome / content_shell can be built.
TEST=In Chrome/content_shell, go to a non-UTF-8 page (www.hankyung.com) or
     run `(new Date()).toLocaleString("de")` to make sure that ICU data
     is accessible.

Review-Url: https://codereview.chromium.org/2181043003
Cr-Commit-Position: refs/heads/master@{#408866}
parent 7075e7b6
...@@ -28,6 +28,7 @@ if (is_android) { ...@@ -28,6 +28,7 @@ if (is_android) {
import("//build/util/version.gni") import("//build/util/version.gni")
import("//build_overrides/v8.gni") import("//build_overrides/v8.gni")
import("//media/cdm/ppapi/cdm_paths.gni") import("//media/cdm/ppapi/cdm_paths.gni")
import("//third_party/icu/config.gni")
} }
if (is_win) { if (is_win) {
...@@ -749,7 +750,6 @@ if (is_win) { ...@@ -749,7 +750,6 @@ if (is_win) {
"$root_gen_dir/repack/resources.pak", "$root_gen_dir/repack/resources.pak",
"$root_out_dir/app_mode_loader.app", "$root_out_dir/app_mode_loader.app",
"$root_out_dir/chrome_100_percent.pak", "$root_out_dir/chrome_100_percent.pak",
"$root_out_dir/icudtl.dat",
"app/theme/default_100_percent/$branding_path_component/product_logo_32.png", "app/theme/default_100_percent/$branding_path_component/product_logo_32.png",
"browser/mac/install.sh", "browser/mac/install.sh",
] ]
...@@ -762,7 +762,6 @@ if (is_win) { ...@@ -762,7 +762,6 @@ if (is_win) {
":packed_extra_resources", ":packed_extra_resources",
":packed_resources", ":packed_resources",
"//chrome/app_shim:app_mode_loader", "//chrome/app_shim:app_mode_loader",
"//third_party/icu:icudata",
] ]
if (enable_hidpi) { if (enable_hidpi) {
...@@ -786,6 +785,11 @@ if (is_win) { ...@@ -786,6 +785,11 @@ if (is_win) {
] ]
} }
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata" ]
}
if (v8_use_external_startup_data) { if (v8_use_external_startup_data) {
sources += [ sources += [
"$root_out_dir/natives_blob.bin", "$root_out_dir/natives_blob.bin",
......
...@@ -16,6 +16,7 @@ if (is_android) { ...@@ -16,6 +16,7 @@ if (is_android) {
} else if (is_mac) { } else if (is_mac) {
import("//build/config/mac/rules.gni") import("//build/config/mac/rules.gni")
import("//build/mac/tweak_info_plist.gni") import("//build/mac/tweak_info_plist.gni")
import("//third_party/icu/config.gni")
import("//v8/gni/v8.gni") import("//v8/gni/v8.gni")
} else if (is_win) { } else if (is_win) {
import("//build/win/syzygy/syzygy.gni") import("//build/win/syzygy/syzygy.gni")
...@@ -573,7 +574,6 @@ if (is_mac) { ...@@ -573,7 +574,6 @@ if (is_mac) {
bundle_data("content_shell_framework_resources") { bundle_data("content_shell_framework_resources") {
sources = [ sources = [
"$root_out_dir/content_shell.pak", "$root_out_dir/content_shell.pak",
"$root_out_dir/icudtl.dat",
"resources/missingImage.png", "resources/missingImage.png",
"resources/textAreaResizeCorner.png", "resources/textAreaResizeCorner.png",
] ]
...@@ -582,9 +582,12 @@ if (is_mac) { ...@@ -582,9 +582,12 @@ if (is_mac) {
":pak", ":pak",
] ]
deps = [ if (icu_use_data_file) {
"//third_party/icu:icudata", sources += [ "$root_out_dir/icudtl.dat" ]
] deps = [
"//third_party/icu:icudata",
]
}
if (v8_use_external_startup_data) { if (v8_use_external_startup_data) {
sources += [ sources += [
......
...@@ -26,6 +26,7 @@ if (is_win) { ...@@ -26,6 +26,7 @@ if (is_win) {
import("//remoting/host/predefines_win.gni") import("//remoting/host/predefines_win.gni")
} else if (is_mac) { } else if (is_mac) {
import("//build/config/mac/rules.gni") import("//build/config/mac/rules.gni")
import("//third_party/icu/config.gni")
} }
# Reference this manifest to indicate that a process is per-monitor DPI aware. # Reference this manifest to indicate that a process is per-monitor DPI aware.
...@@ -976,7 +977,6 @@ if (enable_me2me_host) { ...@@ -976,7 +977,6 @@ if (enable_me2me_host) {
bundle_data("remoting_host_resources") { bundle_data("remoting_host_resources") {
sources = [ sources = [
"$root_gen_dir/remoting/CREDITS.txt", "$root_gen_dir/remoting/CREDITS.txt",
"$root_out_dir/icudtl.dat",
"remoting_me2me_host.icns", "remoting_me2me_host.icns",
] ]
...@@ -986,8 +986,12 @@ if (enable_me2me_host) { ...@@ -986,8 +986,12 @@ if (enable_me2me_host) {
public_deps = [ public_deps = [
":credits", ":credits",
"//third_party/icu:icudata",
] ]
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata" ]
}
} }
} }
......
...@@ -13,6 +13,7 @@ if (is_win) { ...@@ -13,6 +13,7 @@ if (is_win) {
} }
if (is_mac) { if (is_mac) {
import("//build/config/mac/rules.gni") import("//build/config/mac/rules.gni")
import("//third_party/icu/config.gni")
} }
source_set("common") { source_set("common") {
...@@ -100,18 +101,20 @@ if (!is_chromeos && !is_android && enable_remoting_host) { ...@@ -100,18 +101,20 @@ if (!is_chromeos && !is_android && enable_remoting_host) {
] ]
} }
bundle_data("remote_assistance_host_resources") { if (icu_use_data_file) {
sources = [ bundle_data("remote_assistance_host_resources") {
"$root_out_dir/icudtl.dat", sources = [
] "$root_out_dir/icudtl.dat",
]
outputs = [ outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}", "{{bundle_resources_dir}}/{{source_file_part}}",
] ]
public_deps = [ public_deps = [
"//third_party/icu:icudata", "//third_party/icu:icudata",
] ]
}
} }
} else { } else {
app_target_type = "executable" app_target_type = "executable"
...@@ -159,11 +162,13 @@ if (!is_chromeos && !is_android && enable_remoting_host) { ...@@ -159,11 +162,13 @@ if (!is_chromeos && !is_android && enable_remoting_host) {
] ]
} }
deps += [ deps += [
":remote_assistance_host_resources",
":remote_assistance_host_xibs", ":remote_assistance_host_xibs",
"//remoting/host:remoting_infoplist_strings", "//remoting/host:remoting_infoplist_strings",
"//remoting/resources:copy_locales", "//remoting/resources:copy_locales",
] ]
if (icu_use_data_file) {
deps += [ ":remote_assistance_host_resources" ]
}
} }
if (enable_webrtc) { if (enable_webrtc) {
......
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