icu icon indicating copy to clipboard operation
icu copied to clipboard

ICU-21633 Fix ClangCL cross-compilation on Windows

Open StefanStojanovic opened this issue 3 months ago • 1 comments

This PR is a WIP to fix issues with cross-compilation. The current approach is focused on fixing an issue I encountered on Windows with ClangCL (MSVC had no problems).

A quick backstory to better understand my background and motivation. I'm working on supporting Node.js on Windows. There is an ongoing effort to enable Node.js to be compiled with ClangCL. While working on it I noticed an issue when creating .obj file in ICU because of the *pCPU = IMAGE_FILE_MACHINE_UNKNOWN; line, and the code I made fixes that by adding a new option. After some discussion with @srl295, I was made aware of this being a broader problem that should be fixed for multiple compilers and platforms, not only ClangCL/Windows.

The code I have is a starting point and should be built upon. Please keep in mind that my knowledge and experience with other platforms is limited and I'd appreciate any help I can get. I'm also very new to the ICU, so feel free to correct any mistakes I may start making as soon as you see them.

Refs: https://github.com/nodejs/node/pull/53003

Checklist
  • [x] Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-21633
  • [x] Required: The PR title must be prefixed with a JIRA Issue number.
  • [x] Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • [x] Required: Each commit message must be prefixed with a JIRA Issue number.
  • [ ] Issue accepted (done by Technical Committee after discussion)
  • [ ] Tests included, if applicable
  • [ ] API docs and/or User Guide docs changed or added, if applicable

StefanStojanovic avatar May 20 '24 09:05 StefanStojanovic