Commit 9a1832a8 authored by Miran.Karic's avatar Miran.Karic Committed by Commit bot

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}
parent 27a9b032
......@@ -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;
......
......@@ -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);
......
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