phosek created this revision. phosek added a reviewer: EricWF. Herald added subscribers: cfe-commits, christof, mgorny. phosek added a comment.
I don't like this but I'm not sure if there's a better way to do this, do you have any ideas? This avoids the need for a custom generated config file. Repository: rCXX libc++ https://reviews.llvm.org/D45304 Files: libcxx/CMakeLists.txt libcxx/include/__config Index: libcxx/include/__config =================================================================== --- libcxx/include/__config +++ libcxx/include/__config @@ -36,8 +36,12 @@ #define _LIBCPP_VERSION 7000 #ifndef _LIBCPP_ABI_VERSION +#ifdef __Fuchsia__ +#define _LIBCPP_ABI_VERSION 2 +#else #define _LIBCPP_ABI_VERSION 1 #endif +#endif #if defined(__ELF__) # define _LIBCPP_OBJECT_FORMAT_ELF 1 Index: libcxx/CMakeLists.txt =================================================================== --- libcxx/CMakeLists.txt +++ libcxx/CMakeLists.txt @@ -97,7 +97,12 @@ cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY "Install libc++experimental.a" ON "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF) -set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.") +if (FUCHSIA) + set(ABI_VERSION_DEFAULT 2) +else() + set(ABI_VERSION_DEFAULT 1) +endif() +set(LIBCXX_ABI_VERSION ${ABI_VERSION_DEFAULT} CACHE STRING "ABI version of libc++.") option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF) option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.") option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
Index: libcxx/include/__config =================================================================== --- libcxx/include/__config +++ libcxx/include/__config @@ -36,8 +36,12 @@ #define _LIBCPP_VERSION 7000 #ifndef _LIBCPP_ABI_VERSION +#ifdef __Fuchsia__ +#define _LIBCPP_ABI_VERSION 2 +#else #define _LIBCPP_ABI_VERSION 1 #endif +#endif #if defined(__ELF__) # define _LIBCPP_OBJECT_FORMAT_ELF 1 Index: libcxx/CMakeLists.txt =================================================================== --- libcxx/CMakeLists.txt +++ libcxx/CMakeLists.txt @@ -97,7 +97,12 @@ cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY "Install libc++experimental.a" ON "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF) -set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.") +if (FUCHSIA) + set(ABI_VERSION_DEFAULT 2) +else() + set(ABI_VERSION_DEFAULT 1) +endif() +set(LIBCXX_ABI_VERSION ${ABI_VERSION_DEFAULT} CACHE STRING "ABI version of libc++.") option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF) option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.") option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits