[PATCH] D66256: [AIX] For XL, pick GCC-compatible std & default warning options
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 08:50:15 PDT 2019
daltenty added inline comments.
================
Comment at: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake:435
-elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
- append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
- append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS)
- add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
- add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW)
- check_cxx_compiler_flag("-std=${LLVM_CXX_STD}" CXX_SUPPORTS_CXX_STD)
- if (CXX_SUPPORTS_CXX_STD)
- if (CYGWIN OR MINGW)
- # MinGW and Cygwin are a bit stricter and lack things like
- # 'strdup', 'stricmp', etc in c++11 mode.
- string(REPLACE "c++" "gnu++" gnu_LLVM_CXX_STD "${LLVM_CXX_STD}")
- append("-std=${gnu_LLVM_CXX_STD}" CMAKE_CXX_FLAGS)
+else( MSVC )
+ # Warnings-as-errors handling for GCC-compatible compilers:
----------------
I'm not sure you needed to wrap everything in this else now, since everything inside is now guarded on LLVM_COMPILER_IS_GCC_COMPATIBLE and if (MSVC) LLVM_COMPILER_IS_GCC_COMPATIBLE=OFF
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66256/new/
https://reviews.llvm.org/D66256
More information about the llvm-commits
mailing list