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:

#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.)

Activity

Show:

Jeff Genovy February 11, 2019 at 8:32 PM

Fixed

Assignee

Jeff Genovy

Reporter

Components

Reviewer

Priority

Fix versions

Created January 30, 2019 at 2:35 AM
Updated August 21, 2019 at 9:24 PM
Resolved February 11, 2019 at 8:32 PM

Flag notifications