-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICU build issue with clang-cl #34201
Comments
cc @nodejs/i18n |
@targos have not heard of this, may be good to file an ICU bug upstream at https://unicode-org.atlassian.net // |
may have to fall back to |
I am not familiar with icu, which part involved into this ? Is |
I think the problem comes from this file: https://github.com/nodejs/node/blob/a51436cbea0d216f260453321a15fdce72ee28d3/deps/icu-small/source/tools/toolutil/pkg_genc.cpp During compilation, the following printf:
|
The value of 0 for cpu comes from here:
From the comment in the file: // link.exe will link an IMAGE_FILE_MACHINE_UNKNOWN data-only .obj file
// no matter what architecture it is targeting (though other values are
// required to match). Unfortunately, the variable name decoration/mangling
// is slightly different on x86, which means we can't use the UNKNOWN type
// for all architectures though. I wonder if maybe the linker for clang doesn't handle IIRC, the reason If you don't need to cross-compile ARM64 (on a x64 host) then perhaps this could be changed to set an explicit CPU arch when building with clang. Perhaps something like: #elif U_PLATFORM_HAS_WIN32_API
// Windows always runs in little-endian mode.
*pIsBigEndian = FALSE;
// Note: The various _M_<arch> macros are predefined by the MSVC compiler based
// on the target compilation architecture.
// https://docs.microsoft.com/cpp/preprocessor/predefined-macros
// link.exe will link an IMAGE_FILE_MACHINE_UNKNOWN data-only .obj file
// no matter what architecture it is targeting (though other values are
// required to match). Unfortunately, the variable name decoration/mangling
// is slightly different on x86, which means we can't use the UNKNOWN type
// for all architectures though.
# if defined(_M_IX86)
*pCPU = IMAGE_FILE_MACHINE_I386;
# else
#ifndef (__clang__)
// the linker for clang-cl doesn't work with unknown.
*pCPU = IMAGE_FILE_MACHINE_UNKNOWN;
#elif defined(_M_AMD64)
*pCPU = IMAGE_FILE_MACHINE_AMD64;
#endif /* ifndef (__clang__) */
# endif |
Unfortunately, we do cross-compile ARM64 on x64 hosts. |
This uses the previously backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201
This uses the backported ICU fix needed for compiling with ClangCL. Refs: #54502 Fixes: #34201 PR-URL: #54655 Refs: #52809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Steven R Loomis <[email protected]>
This uses the backported ICU fix needed for compiling with ClangCL. Refs: #54502 Fixes: #34201 PR-URL: #54655 Refs: #52809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Steven R Loomis <[email protected]>
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201 PR-URL: nodejs#54655 Refs: nodejs#52809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Steven R Loomis <[email protected]>
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201 PR-URL: nodejs#54655 Refs: nodejs#52809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Steven R Loomis <[email protected]>
I'm experimenting with Visual Studio's Clang support and have an issue with ICU:
There's only one line with an error while building
tools\icu\icudata.vcxproj
/cc @srl295
Diff to get there
The text was updated successfully, but these errors were encountered: