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")
import("snapshot_toolchain.gni")
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.
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
v8_use_snapshot = true
......@@ -1836,8 +1840,13 @@ v8_source_set("v8_base") {
deps += [ "//third_party/icu:icudata" ]
}
# TODO(jochen): Add support for icu_use_data_file_flag
defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
if (icu_use_data_file_flag) {
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 {
sources -= [
"src/i18n.cc",
......
......@@ -22,6 +22,7 @@ if (((v8_target_arch == "ia32" ||
v8_enable_gdbjit = true
}
icu_use_data_file_flag = false
v8_imminent_deprecation_warnings = true
v8_optimized_debug = false
v8_extra_library_files = []
......
......@@ -1603,7 +1603,20 @@
'dependencies': [
'<(icu_gyp_path):icui18n',
'<(icu_gyp_path):icuuc',
]
],
'conditions': [
['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'],
}],
],
}],
],
}, { # v8_enable_i18n_support==0
'sources!': [
'i18n.cc',
......@@ -1615,17 +1628,6 @@
'<(icu_gyp_path):icudata',
],
}],
['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'],
}],
],
}],
],
},
{
......
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