[libcxx] improve LIBCXX_ABI_NAMESPACE error message
authorFlorian Mayer <fmayer@google.com>
Tue, 7 Jun 2022 22:26:05 +0000 (15:26 -0700)
committerFlorian Mayer <fmayer@google.com>
Thu, 9 Jun 2022 15:47:51 +0000 (08:47 -0700)
include the invalid LIBCXX_ABI_NAMESPACE to ease debugging.

Reviewed By: #libc, jloser, ldionne

Differential Revision: https://reviews.llvm.org/D127257

libcxx/CMakeLists.txt

index 829e414..7a8ad2d 100644 (file)
@@ -187,7 +187,7 @@ set(LIBCXX_LIBRARY_VERSION "${LIBCXX_ABI_VERSION}.0" CACHE STRING
    this also controls the linker's 'current_version' property.")
 set(LIBCXX_ABI_NAMESPACE "__${LIBCXX_ABI_VERSION}" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
 if (NOT LIBCXX_ABI_NAMESPACE MATCHES "__.*")
-  message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE must be a reserved identifier.")
+  message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE must be a reserved identifier, is '${LIBCXX_ABI_NAMESPACE}'.")
 endif()
 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.")