Skip to content
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

[libc++][modules] Fix disabling Unicode #81294

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

poyaoc97
Copy link
Member

@poyaoc97 poyaoc97 commented Feb 9, 2024

-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build without this change.

-DLIBCXX_ENABLE_UNICODE=ON or -D_LIBCPP_HAS_NO_UNICODE
doesn't build without this change.
@poyaoc97 poyaoc97 requested a review from a team as a code owner February 9, 2024 18:37
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 9, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 9, 2024

@llvm/pr-subscribers-libcxx

Author: Po-yao Chang (poyaoc97)

Changes

-DLIBCXX_ENABLE_UNICODE=ON or -D_LIBCPP_HAS_NO_UNICODE doesn't build without this change.


Full diff: https://github.com/llvm/llvm-project/pull/81294.diff

1 Files Affected:

  • (modified) libcxx/modules/std/ostream.inc (+3-1)
diff --git a/libcxx/modules/std/ostream.inc b/libcxx/modules/std/ostream.inc
index 8fcbfb4bdc1828..0e0e2d54fe6bae 100644
--- a/libcxx/modules/std/ostream.inc
+++ b/libcxx/modules/std/ostream.inc
@@ -33,8 +33,10 @@ export namespace std {
   using std::println;
 
   using std::vprint_nonunicode;
+#    ifndef _LIBCPP_HAS_NO_UNICODE
   using std::vprint_unicode;
-#  endif // _LIBCPP_STD_VER >= 23
+#    endif // _LIBCPP_HAS_NO_UNICODE
+#  endif   // _LIBCPP_STD_VER >= 23
 
 #endif // _LIBCPP_HAS_NO_LOCALIZATION
 } // namespace std

@mordante mordante added this to the LLVM 18.X Release milestone Feb 10, 2024
Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! I'll directly land this since I'd like to backport this to the release branch.

@mordante mordante self-assigned this Feb 10, 2024
@mordante mordante merged commit 30cd183 into llvm:main Feb 10, 2024
52 of 53 checks passed
@mordante
Copy link
Member

/cherry-pick

@mordante mordante modified the milestone: LLVM 18.X Release Feb 10, 2024
@mordante
Copy link
Member

/cherry-pick

@mordante
Copy link
Member

/cherry-pick 30cd183

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 10, 2024

Failed to create pull request for issue81294 https://github.com/llvm/llvm-project/actions/runs/7855866026

@mordante
Copy link
Member

/cherry-pick 30cd183

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Feb 10, 2024
-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd183)
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 10, 2024

/pull-request #81361

tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd183)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd183)
tstellar pushed a commit to tstellar/llvm-project that referenced this pull request Feb 14, 2024
-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd183)
@pointhex pointhex mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants