We're updating the issue view to help you get more done. 

ICU4C: pkgdata and genccode support ARM32 but not ARM64 on Windows platforms.

Description

The tools pkgdata and genccode on Windows currently support ARM 32-bit, but not ARM 64-bit.

However, when building the data .obj files, the image file type doesn't need to be set, as the unknown type can be used: IMAGE_FILE_MACHINE_UNKNOWN.

This is what is currently used for AMD64 (x64) architecture.

We should modify this to simply the code, which will also enable support for ARM64 as well.

From the file pkg_genc.cpp
https://github.com/unicode-org/icu/blob/master/icu4c/source/tools/toolutil/pkg_genc.cpp#L689-L707

Here is what the current code looks like:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #elif U_PLATFORM_HAS_WIN32_API /* _M_IA64 should be defined in windows.h */ # if defined(_M_IA64) *pCPU=IMAGE_FILE_MACHINE_IA64; *pBits = 64; # elif defined(_M_AMD64) // link.exe does not really care about the .obj machine type and this will // allow us to build a dll for both ARM & x64 with an amd64 built tool // ARM is same as x64 except for first 2 bytes of object file *pCPU = IMAGE_FILE_MACHINE_UNKNOWN; // *pCPU = IMAGE_FILE_MACHINE_ARMNT; // If we wanted to be explicit // *pCPU = IMAGE_FILE_MACHINE_AMD64; // We would use one of these names *pBits = 64; // Doesn't seem to be used for anything interesting? # else *pCPU=IMAGE_FILE_MACHINE_I386; // We would use one of these names *pBits = 32; # endif *pIsBigEndian=FALSE; #else # error "Unknown platform for CAN_GENERATE_OBJECTS." #endif

(Thanks to Jon Kunkee for pointing out the bug here.)

Status

Assignee

Jeff Genovy

Reporter

Jeff Genovy

Labels

Reviewer

Axel Andrejs

Components

Fix versions

Priority

major