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:
parent
27a9b032ab
commit
9a1832a829
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user