-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libc++][z/OS] Need to define _LIBCPP_HAS_UNICODE to 0 for EBCDIC #119244
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
Conversation
|
@llvm/pr-subscribers-libcxx Author: Zibi Sarbinowski (zibi2) ChangesThis PR is needed since EBCDIC does not support UNICODE. Full diff: https://github.com/llvm/llvm-project/pull/119244.diff 1 Files Affected:
diff --git a/libcxx/include/__config_site.in b/libcxx/include/__config_site.in
index fc01aaf2d8746e..b575a5de8e0d0b 100644
--- a/libcxx/include/__config_site.in
+++ b/libcxx/include/__config_site.in
@@ -28,7 +28,11 @@
#cmakedefine01 _LIBCPP_HAS_FILESYSTEM
#cmakedefine01 _LIBCPP_HAS_RANDOM_DEVICE
#cmakedefine01 _LIBCPP_HAS_LOCALIZATION
+#if defined(__MVS__) && !defined(__NATIVE_ASCII_F)
+#cmakedefine _LIBCPP_HAS_UNICODE 0
+#else
#cmakedefine01 _LIBCPP_HAS_UNICODE
+#endif
#cmakedefine01 _LIBCPP_HAS_WIDE_CHARACTERS
#cmakedefine _LIBCPP_HAS_NO_STD_MODULES
#cmakedefine01 _LIBCPP_HAS_TIME_ZONE_DATABASE
|
d387049 to
32c6693
Compare
perry-ca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
Supporting EBCDIC and z/OS requires a lot more changes than just this unless I am mistaken. I know you folks tried upstreaming a lot of that support a few years ago but AFAICT we never got consensus for moving forward with those changes, which were quite involved. AIX doesn't have the same challenges and we're happy to support it upstream. I would like to have a broader discussion about EBCDIC support in libc++ before we start cherry-picking small changes like this into our codebase -- that ask is consistent with what we do for other platforms that are not "officially supported". |
Louis, this change is the result of relatively new common changes which broke us and we are trying very hard to absorb ALL changes and correct them as they come to keep all libc++ tests clean. It does help us to stay current and do not degrade. I hope you will accept this and approve it since this is not part of the larger changes we need to discuss again. FYI, @perry-ca is going to write document likely RFC about the changes we need to support libc++ on z/OS and that is not just EBCDIC related. |
|
Well, the appropriate way to disable unicode would be to set |
Yes, that would work thanks for a suggestion and a quick review. |
This PR is needed since EBCDIC does not support UNICODE.