From 6c05f2dab384fd5f9b086be3323c0a7f4f10d8fc Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Wed, 12 May 2021 14:45:10 -0700 Subject: [PATCH] [libcxxabi] Remove unnecessary define from build Now that we're passing -D_LIBCPP_BUILDING_LIBRARY to the libc++abi build, -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is redundant (https://github.com/llvm/llvm-project/blob/fb3a00c327df78eaa534e53ac6f07112e0585121/libcxx/include/exception#L120-L121 is the only use of _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS in libc++, and that conditional also checks for _LIBCPP_BUILDING_LIBRARY). Reviewed By: #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D102372 --- libcxxabi/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index d4eb01ce3888..1e8b73aa38cc 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -477,10 +477,6 @@ endif() # Prevent libc++abi from having library dependencies on libc++ add_definitions(-D_LIBCPP_DISABLE_EXTERN_TEMPLATE) -# Bring back `std::unexpected`, which is removed in C++17, to support -# pre-C++17. -add_definitions(-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) - if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif()