diff --git a/libcxx/cmake/caches/Generic-no-exceptions.cmake b/libcxx/cmake/caches/Generic-no-exceptions.cmake --- a/libcxx/cmake/caches/Generic-no-exceptions.cmake +++ b/libcxx/cmake/caches/Generic-no-exceptions.cmake @@ -1,2 +1,3 @@ +set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically. set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "") set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "") diff --git a/libcxx/docs/Modules.rst b/libcxx/docs/Modules.rst --- a/libcxx/docs/Modules.rst +++ b/libcxx/docs/Modules.rst @@ -48,9 +48,15 @@ * ``LIBCXX_ENABLE_FILESYSTEM`` * ``LIBCXX_ENABLE_RANDOM_DEVICE`` * ``LIBCXX_ENABLE_UNICODE`` + * ``LIBCXX_ENABLE_EXCEPTIONS`` [#note-no-windows]_ * A C++20 based extension +.. note:: + + .. [#note-no-windows] This configuration will probably not work on Windows + due to hard-coded compilation flags. + Some of the current limitations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/libcxx/modules/CMakeLists.txt.in b/libcxx/modules/CMakeLists.txt.in --- a/libcxx/modules/CMakeLists.txt.in +++ b/libcxx/modules/CMakeLists.txt.in @@ -29,10 +29,6 @@ endif() endmacro() -if(NOT @LIBCXX_ENABLE_EXCEPTIONS@ OR NOT @LIBCXXABI_ENABLE_EXCEPTIONS@) - message(FATAL_ERROR "Modules without exception support is not yet implemented.") -endif() - add_library(std) target_sources(std PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES @@ -42,6 +38,10 @@ target_compile_definitions(std PRIVATE _LIBCPP_ENABLE_EXPERIMENTAL) target_include_directories(std SYSTEM PRIVATE @LIBCXX_CONFIGURED_INCLUDE_DIRS@) +if (NOT @LIBCXX_ENABLE_EXCEPTIONS@) + target_compile_options(std PUBLIC -fno-exceptions) +endif() + target_compile_options(std PUBLIC -nostdinc++ diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -705,8 +705,11 @@ - "**/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"