Add icu libraries to unittests dependencies

In component build, unittests did not link with icu libraries, which
caused errors. By adding icu libraries to dependencies unittests links
correctly.

BUG=
TEST=unittests/*

Review-Url: https://codereview.chromium.org/2479863002
Cr-Commit-Position: refs/heads/master@{#40955}
This commit is contained in:
Miran.Karic 2016-11-14 02:00:58 -08:00 committed by Commit bot
parent b62e2284b1
commit 6f556b3394
4 changed files with 14 additions and 4 deletions

View File

@ -43,10 +43,6 @@ declare_args() {
# Sets -dENABLE_HANDLE_ZAPPING. # Sets -dENABLE_HANDLE_ZAPPING.
v8_enable_handle_zapping = true v8_enable_handle_zapping = true
# Enable ECMAScript Internationalization API. Enabling this feature will
# add a dependency on the ICU library.
v8_enable_i18n_support = true
# Enable slow dchecks. # Enable slow dchecks.
v8_enable_slow_dchecks = false v8_enable_slow_dchecks = false

View File

@ -26,6 +26,10 @@ declare_args() {
# Use external files for startup data blobs: # Use external files for startup data blobs:
# the JS builtins sources and the start snapshot. # the JS builtins sources and the start snapshot.
v8_use_external_startup_data = "" v8_use_external_startup_data = ""
# Enable ECMAScript Internationalization API. Enabling this feature will
# add a dependency on the ICU library.
v8_enable_i18n_support = true
} }
if (v8_use_external_startup_data == "") { if (v8_use_external_startup_data == "") {

View File

@ -172,6 +172,10 @@ v8_executable("unittests") {
"//testing/gtest", "//testing/gtest",
] ]
if (v8_enable_i18n_support) {
deps += [ "//third_party/icu" ]
}
if (is_win) { if (is_win) {
# This warning is benignly triggered by the U16 and U32 macros in # This warning is benignly triggered by the U16 and U32 macros in
# bytecode-utils.h. # bytecode-utils.h.

View File

@ -231,6 +231,12 @@
['OS=="aix"', { ['OS=="aix"', {
'ldflags': [ '-Wl,-bbigtoc' ], 'ldflags': [ '-Wl,-bbigtoc' ],
}], }],
['v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icui18n',
'<(icu_gyp_path):icuuc',
],
}],
['os_posix == 1', { ['os_posix == 1', {
# TODO(svenpanne): This is a temporary work-around to fix the warnings # TODO(svenpanne): This is a temporary work-around to fix the warnings
# that show up because we use -std=gnu++0x instead of -std=c++11. # that show up because we use -std=gnu++0x instead of -std=c++11.