Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -67,7 +67,7 @@ option(LIBCXX_ENABLE_ASSERTIONS "Enable assertions independent of build mode." OFF) option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON) option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON) -option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON) +option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" $) set(ENABLE_FILESYSTEM_DEFAULT ${LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY}) if (WIN32) set(ENABLE_FILESYSTEM_DEFAULT OFF) @@ -542,8 +542,13 @@ # Warning flags =============================================================== add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +if (MSVC) + add_compile_flags(/W4) +else() + add_compile_flags_if_supported(-Wall) +endif() add_compile_flags_if_supported( - -Wall -Wextra -W -Wwrite-strings + -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type) if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") Index: include/filesystem =================================================================== --- include/filesystem +++ include/filesystem @@ -1390,7 +1390,6 @@ return __storage_->__what_.c_str(); } - _LIBCPP_FUNC_VIS void __create_what(int __num_paths); private: Index: test/std/strings/c.strings/cuchar.pass.cpp =================================================================== --- test/std/strings/c.strings/cuchar.pass.cpp +++ test/std/strings/c.strings/cuchar.pass.cpp @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// // // XFAIL: * +// +// The MSVC stdlib has cuchar, which causes this test to pass unexpectedly. +// UNSUPPORTED: windows // Index: test/support/test_macros.h =================================================================== --- test/support/test_macros.h +++ test/support/test_macros.h @@ -143,11 +143,6 @@ # define TEST_HAS_C11_FEATURES # define TEST_HAS_TIMESPEC_GET # endif -# elif defined(_WIN32) -# if defined(_MSC_VER) && !defined(__MINGW32__) -# define TEST_HAS_C11_FEATURES // Using Microsoft's C Runtime library -# define TEST_HAS_TIMESPEC_GET -# endif # endif #endif Index: test/support/verbose_assert.h =================================================================== --- test/support/verbose_assert.h +++ test/support/verbose_assert.h @@ -21,18 +21,18 @@ template ::value ? 1 : (IsStreamable::value ? 2 : -1))> -struct SelectStream { +struct SelectErrStream { static_assert(ST == -1, "specialization required for ST != -1"); static void Print(Tp const&) { std::clog << "Value Not Streamable!\n"; } }; template -struct SelectStream { +struct SelectErrStream { static void Print(Tp const& val) { std::cerr << val; } }; template -struct SelectStream { +struct SelectErrStream { static void Print(Tp const& val) { std::wcerr << val; } }; @@ -86,14 +86,14 @@ template friend LogType& operator<<(LogType& log, Tp const& value) { if (!log.is_disabled) { - SelectStream::Print(value); + SelectErrStream::Print(value); } return log; } friend LogType& operator<<(LogType& log, EndLType* m) { if (!log.is_disabled) { - SelectStream::Print(m); + std::cerr << m; } return log; } Index: utils/libcxx/test/config.py =================================================================== --- utils/libcxx/test/config.py +++ utils/libcxx/test/config.py @@ -515,6 +515,10 @@ # and so that those tests don't have to be changed to tolerate # this insanity. self.cxx.compile_flags += ['-DNOMINMAX'] + # Disable auto-linking; the library is linked manually when + # configuring the linker flags. + if self.cxx_stdlib_under_test == 'libc++': + self.cxx.compile_flags += ['-D_LIBCPP_NO_AUTO_LINK'] additional_flags = self.get_lit_conf('test_compiler_flags') if additional_flags: self.cxx.compile_flags += shlex.split(additional_flags)