Set correct default icu data file for big endian

Default icu data file for all architectures was set to icudtl.dat, for
big endian this should be icudtb.dat. This will fix intl tests for big
endian once v8 rolls to a newer version of icu that supports big endian.

BUG=
TEST=intl/*

Review-Url: https://codereview.chromium.org/2182043002
Cr-Commit-Position: refs/heads/master@{#38102}
This commit is contained in:
Miran.Karic 2016-07-27 07:37:07 -07:00 committed by Commit bot
parent 27a9b032ab
commit 9a1832a829
2 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,7 @@
#include "unicode/putil.h"
#include "unicode/udata.h"
#include "src/base/build_config.h"
#include "src/base/file-utils.h"
#define ICU_UTIL_DATA_FILE 0
@ -50,7 +51,13 @@ bool InitializeICUDefaultLocation(const char* exec_path,
return InitializeICU(icu_data_file);
}
char* icu_data_file_default;
#if defined(V8_TARGET_LITTLE_ENDIAN)
RelativePath(&icu_data_file_default, exec_path, "icudtl.dat");
#elif defined(V8_TARGET_BIG_ENDIAN)
RelativePath(&icu_data_file_default, exec_path, "icudtb.dat");
#else
#error Unknown byte ordering
#endif
bool result = InitializeICU(icu_data_file_default);
free(icu_data_file_default);
return result;

View File

@ -14,7 +14,7 @@ namespace internal {
// function should be called before ICU is used.
bool InitializeICU(const char* icu_data_file);
// Like above, but using the default icudtl.dat location if icu_data_file is
// Like above, but using the default icudt[lb].dat location if icu_data_file is
// not specified.
bool InitializeICUDefaultLocation(const char* exec_path,
const char* icu_data_file);