Commit 517b6599 authored by machenbach's avatar machenbach Committed by Commit bot

[gn] Port icu_use_data_file_flag in gn

BUG=chromium:474921
LOG=n
NOTRY=true

Review-Url: https://codereview.chromium.org/1988023003
Cr-Commit-Position: refs/heads/master@{#36329}
parent 4a96bc2a
...@@ -18,6 +18,10 @@ import("//build_overrides/v8.gni") ...@@ -18,6 +18,10 @@ import("//build_overrides/v8.gni")
import("snapshot_toolchain.gni") import("snapshot_toolchain.gni")
declare_args() { declare_args() {
# Use ICU data file (icudtl.dat) if true or library (shared on windows,
# static otherwise).
icu_use_data_file_flag = true
# Enable the snapshot feature, for fast context creation. # Enable the snapshot feature, for fast context creation.
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
v8_use_snapshot = true v8_use_snapshot = true
...@@ -1836,8 +1840,13 @@ v8_source_set("v8_base") { ...@@ -1836,8 +1840,13 @@ v8_source_set("v8_base") {
deps += [ "//third_party/icu:icudata" ] deps += [ "//third_party/icu:icudata" ]
} }
# TODO(jochen): Add support for icu_use_data_file_flag if (icu_use_data_file_flag) {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
} else if (is_win) {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED" ]
} else {
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC" ]
}
} else { } else {
sources -= [ sources -= [
"src/i18n.cc", "src/i18n.cc",
......
...@@ -22,6 +22,7 @@ if (((v8_target_arch == "ia32" || ...@@ -22,6 +22,7 @@ if (((v8_target_arch == "ia32" ||
v8_enable_gdbjit = true v8_enable_gdbjit = true
} }
icu_use_data_file_flag = false
v8_imminent_deprecation_warnings = true v8_imminent_deprecation_warnings = true
v8_optimized_debug = false v8_optimized_debug = false
v8_extra_library_files = [] v8_extra_library_files = []
......
...@@ -1603,18 +1603,8 @@ ...@@ -1603,18 +1603,8 @@
'dependencies': [ 'dependencies': [
'<(icu_gyp_path):icui18n', '<(icu_gyp_path):icui18n',
'<(icu_gyp_path):icuuc', '<(icu_gyp_path):icuuc',
]
}, { # v8_enable_i18n_support==0
'sources!': [
'i18n.cc',
'i18n.h',
],
}],
['OS=="win" and v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icudata',
], ],
}], 'conditions': [
['icu_use_data_file_flag==1', { ['icu_use_data_file_flag==1', {
'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
}, { # else icu_use_data_file_flag !=1 }, { # else icu_use_data_file_flag !=1
...@@ -1627,6 +1617,18 @@ ...@@ -1627,6 +1617,18 @@
], ],
}], }],
], ],
}, { # v8_enable_i18n_support==0
'sources!': [
'i18n.cc',
'i18n.h',
],
}],
['OS=="win" and v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icudata',
],
}],
],
}, },
{ {
'target_name': 'v8_libbase', 'target_name': 'v8_libbase',
......
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