[libcxx-commits] [libcxx] cfab868 - [libc++][C++20 modules] Tests no unicode build.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 22 11:17:43 PDT 2023


Author: Mark de Wever
Date: 2023-08-22T20:17:37+02:00
New Revision: cfab8686bfb1cf8151a16891e535b55aa24d9e38

URL: https://github.com/llvm/llvm-project/commit/cfab8686bfb1cf8151a16891e535b55aa24d9e38
DIFF: https://github.com/llvm/llvm-project/commit/cfab8686bfb1cf8151a16891e535b55aa24d9e38.diff

LOG: [libc++][C++20 modules] Tests no unicode build.

Depends on D158347

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D158357

Added: 
    

Modified: 
    libcxx/cmake/caches/Generic-no-unicode.cmake
    libcxx/docs/Modules.rst
    libcxx/modules/CMakeLists.txt.in
    libcxx/modules/std/print.inc
    libcxx/utils/ci/buildkite-pipeline.yml

Removed: 
    


################################################################################
diff  --git a/libcxx/cmake/caches/Generic-no-unicode.cmake b/libcxx/cmake/caches/Generic-no-unicode.cmake
index 01160bf218981a..880e2d502ad91b 100644
--- a/libcxx/cmake/caches/Generic-no-unicode.cmake
+++ b/libcxx/cmake/caches/Generic-no-unicode.cmake
@@ -1 +1,2 @@
+set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
 set(LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")

diff  --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst
index a95b5ef416132c..f7c4ea9412baad 100644
--- a/libcxx/docs/Modules.rst
+++ b/libcxx/docs/Modules.rst
@@ -47,6 +47,7 @@ What works
    * ``LIBCXX_ENABLE_THREADS``
    * ``LIBCXX_ENABLE_FILESYSTEM``
    * ``LIBCXX_ENABLE_RANDOM_DEVICE``
+   * ``LIBCXX_ENABLE_UNICODE``
 
 Some of the current limitations
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

diff  --git a/libcxx/modules/CMakeLists.txt.in b/libcxx/modules/CMakeLists.txt.in
index e5fe6e985435fc..1e4b3f9e0d6780 100644
--- a/libcxx/modules/CMakeLists.txt.in
+++ b/libcxx/modules/CMakeLists.txt.in
@@ -29,9 +29,6 @@ macro(compile_define_if condition def)
   endif()
 endmacro()
 
-if(NOT @LIBCXX_ENABLE_UNICODE@)
-  message(FATAL_ERROR "Modules without Unicode support is not yet implemented.")
-endif()
 if(NOT @LIBCXX_ENABLE_EXCEPTIONS@ OR NOT @LIBCXXABI_ENABLE_EXCEPTIONS@)
   message(FATAL_ERROR "Modules without exception support is not yet implemented.")
 endif()

diff  --git a/libcxx/modules/std/print.inc b/libcxx/modules/std/print.inc
index 32304d22926ca9..35a1635cf201f3 100644
--- a/libcxx/modules/std/print.inc
+++ b/libcxx/modules/std/print.inc
@@ -13,5 +13,7 @@ export namespace std {
   using std::println;
 
   using std::vprint_nonunicode;
+#ifndef _LIBCPP_HAS_NO_UNICODE
   using std::vprint_unicode;
+#endif // _LIBCPP_HAS_NO_UNICODE
 } // namespace std

diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 6ae14eebfe5fb6..19f3703ad9841c 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -653,8 +653,11 @@ steps:
         - "**/test-results.xml"
         - "**/*.abilist"
       env:
-          CC: "clang-${LLVM_HEAD_VERSION}"
-          CXX: "clang++-${LLVM_HEAD_VERSION}"
+          # Note: Modules require and absolute path for clang-scan-deps
+          # https://github.com/llvm/llvm-project/issues/61006
+          CC: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
+          CXX: "/usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
+          CMAKE: "/opt/bin/cmake"
           ENABLE_CLANG_TIDY: "On"
       agents:
         queue: "libcxx-builders"


        


More information about the libcxx-commits mailing list