Skip to content

Commit

Permalink
Use icudat*.dat file on Mac
Browse files Browse the repository at this point in the history
1. Set icu_use_data_file_flag to 1 in common.gypi
2. Add icudatl.dat to the resournce bundle list in
chrome_dll_bundle.gypi and content_shell.gypi
3. Move ICU_UTIL_DATA_IMPL to base.gyp

This CL has to be landed after
https://codereview.chromium.org/111723007/ is landed and rolled in. 
(done in https://codereview.chromium.org/118313004/ )

Note to perf-sheriff: This CL adds ~10MB to the resource bundle while cutting down the same amount from the Chrome executable/binary.  

BUG=72633
TEST=All the Mac builds (static, shared) go through and tests (e.g.
layout tests, base_unittests --gtest_filter=*String*, net_unittests
--gtest_filter=*IDN*) loading the ICU data pass.

Review URL: https://codereview.chromium.org/109013004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247404 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jshin@chromium.org committed Jan 28, 2014
1 parent d2df3a9 commit 30c246b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 29 deletions.
11 changes: 11 additions & 0 deletions base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@
4267,
],
}],
['icu_use_data_file_flag==1', {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
}, { # else icu_use_data_file_flag !=1
'conditions': [
['OS=="win"', {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
}, {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
}],
],
}],
],
'export_dependent_settings': [
'base',
Expand Down
14 changes: 3 additions & 11 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,9 @@
}],
],
}], # os_posix==1 and OS!="mac" and OS!="ios"
['OS=="mac"', {
'icu_use_data_file_flag%': 1,
}], # os=="mac"
['OS=="ios"', {
'disable_nacl%': 1,
'enable_background%': 0,
Expand Down Expand Up @@ -2214,17 +2217,6 @@
['use_udev==1', {
'defines': ['USE_UDEV'],
}],
['icu_use_data_file_flag==1', {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
}, { # else icu_use_data_file_flag !=1
'conditions': [
['OS=="win"', {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
}, {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
}],
],
}],
['fastbuild!=0', {
'xcode_settings': {
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
Expand Down
5 changes: 5 additions & 0 deletions chrome/chrome_dll_bundle.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,10 @@
],
}],
}],
['icu_use_data_file_flag==1', {
'mac_bundle_resources': [
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
], # conditions
}
41 changes: 23 additions & 18 deletions content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -729,24 +729,24 @@
'shell/app/shell_content_main.cc',
'shell/app/shell_content_main.h',
],
'postbuilds': [
{
# Modify the Info.plist as needed. The script explains why
# this is needed. This is also done in the chrome target.
# The framework needs the Breakpad keys if this feature is
# enabled. It does not need the Keystone keys; these always
# come from the outer application bundle. The framework
# doesn't currently use the SCM keys for anything,
# but this seems like a really good place to store them.
'postbuild_name': 'Tweak Info.plist',
'action': ['../build/mac/tweak_info_plist.py',
'--breakpad=1',
'--keystone=0',
'--scm=1',
'--version=<(content_shell_version)',
'--branding=<(content_shell_product_name)'],
},
],
'postbuilds': [
{
# Modify the Info.plist as needed. The script explains why
# this is needed. This is also done in the chrome target.
# The framework needs the Breakpad keys if this feature is
# enabled. It does not need the Keystone keys; these always
# come from the outer application bundle. The framework
# doesn't currently use the SCM keys for anything,
# but this seems like a really good place to store them.
'postbuild_name': 'Tweak Info.plist',
'action': ['../build/mac/tweak_info_plist.py',
'--breakpad=1',
'--keystone=0',
'--scm=1',
'--version=<(content_shell_version)',
'--branding=<(content_shell_product_name)'],
},
],
'copies': [
{
# Copy FFmpeg binaries for audio/video support.
Expand Down Expand Up @@ -779,6 +779,11 @@
}],
],
}],
['icu_use_data_file_flag==1', {
'mac_bundle_resources': [
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
],
}, # target content_shell_framework
{
Expand Down

0 comments on commit 30c246b

Please sign in to comment.