On Oct 2, 2013 12:49 AM, "Alexey Samsonov" <[email protected]> wrote: > > Author: samsonov > Date: Wed Oct 2 02:44:19 2013 > New Revision: 191814 > > URL: http://llvm.org/viewvc/llvm-project?rev=191814&view=rev > Log: > Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false. > > libcxx doesn't build with -Werror because of #warnings in its source > code.
This seems a little problematic. Is there no way to get a clean libcxx build? If not, should we enable certain warnings as errors (I'm looking at you, -Wreturn-type)? Or, perhaps better, use -Werror and downgrade specific warnings back to warnings (or disable them entirely) > But when libcxx is built as an external LLVM project, it inherits > LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled. > > Modified: > libcxx/trunk/CMakeLists.txt > libcxx/trunk/cmake/config-ix.cmake > > Modified: libcxx/trunk/CMakeLists.txt > URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=191814&r1=191813&r2=191814&view=diff > ============================================================================== > --- libcxx/trunk/CMakeLists.txt (original) > +++ libcxx/trunk/CMakeLists.txt Wed Oct 2 02:44:19 2013 > @@ -189,6 +189,9 @@ append_if(LIBCXX_CXX_WARNING_FLAGS LIBCX > if (LIBCXX_ENABLE_WERROR) > append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WERROR_FLAG -Werror) > append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WX_FLAG -WX) > +else() > + append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WNO_ERROR_FLAG -Wno-error) > + append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_NO_WX_FLAG -WX-) > endif() > if (LIBCXX_ENABLE_PEDANTIC) > append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_PEDANTIC_FLAG -pedantic) > > Modified: libcxx/trunk/cmake/config-ix.cmake > URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/config-ix.cmake?rev=191814&r1=191813&r2=191814&view=diff > ============================================================================== > --- libcxx/trunk/cmake/config-ix.cmake (original) > +++ libcxx/trunk/cmake/config-ix.cmake Wed Oct 2 02:44:19 2013 > @@ -13,9 +13,11 @@ check_cxx_compiler_flag(-Wwrite-strings > check_cxx_compiler_flag(-Wno-long-long LIBCXX_HAS_WNO_LONG_LONG_FLAG) > check_cxx_compiler_flag(-pedantic LIBCXX_HAS_PEDANTIC_FLAG) > check_cxx_compiler_flag(-Werror LIBCXX_HAS_WERROR_FLAG) > +check_cxx_compiler_flag(-Wno-error LIBCXX_HAS_WNO_ERROR_FLAG) > check_cxx_compiler_flag(-fno-exceptions LIBCXX_HAS_FNO_EXCEPTIONS_FLAG) > check_cxx_compiler_flag(-fno-rtti LIBCXX_HAS_FNO_RTTI_FLAG) > check_cxx_compiler_flag(/WX LIBCXX_HAS_WX_FLAG) > +check_cxx_compiler_flag(/WX- LIBCXX_HAS_NO_WX_FLAG) > check_cxx_compiler_flag(/EHsc LIBCXX_HAS_EHSC_FLAG) > check_cxx_compiler_flag(/EHs- LIBCXX_HAS_NO_EHS_FLAG) > check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG) > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
