ICU-21633 Fix ClangCL cross-compilation on Windows #3013
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: nodejs/node#53003
Checklist