[PATCH] D60434: Add a default for LLVM_CXX_STD in HandleLLVMOptions
Nathan Lanza via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 18:31:52 PDT 2019
lanza created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
A recent patch changed LLVM to use an LLVM_CXX_STD variable for
defining the C++ standard to use and also removed the default unset
case from HandleLLVMOption's usage. This broke standalone builds since,
for example, lldb's LLDBStandalone.cmake called HandleLLVMOptions.cmake
without this variable set.
Define a default value of c++11 for this value.
Repository:
rL LLVM
https://reviews.llvm.org/D60434
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -437,6 +437,9 @@
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)
+ if (NOT LLVM_CXX_STD)
+ set(LLVM_CXX_STD "c++11")
+ endif()
check_cxx_compiler_flag("-std=${LLVM_CXX_STD}" CXX_SUPPORTS_CXX_STD)
if (CXX_SUPPORTS_CXX_STD)
if (CYGWIN OR MINGW)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60434.194233.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190409/e8fd590b/attachment.bin>
More information about the llvm-commits
mailing list