r210320 - Revert "Revert "Devise a package-private means to determine the LLVM version string""
Alp Toker
alp at nuanti.com
Fri Jun 6 03:36:24 PDT 2014
Author: alp
Date: Fri Jun 6 05:36:22 2014
New Revision: 210320
URL: http://llvm.org/viewvc/llvm-project?rev=210320&view=rev
Log:
Revert "Revert "Devise a package-private means to determine the LLVM version string""
We probably just need to touch LLVM's configure this time to work around the
totally inadequate Makefile build server integration.
This reverts commit r210314.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/include/clang/Config/config.h.cmake
cfe/trunk/include/clang/Config/config.h.in
cfe/trunk/lib/Basic/Version.cpp
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=210320&r1=210319&r2=210320&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Fri Jun 6 05:36:22 2014
@@ -156,6 +156,9 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
endif()
set( CLANG_BUILT_STANDALONE 1 )
+ set(BACKEND_PACKAGE_STRING "LLVM ${LLVM_PACKAGE_VERSION}")
+else()
+ set(BACKEND_PACKAGE_STRING "${PACKAGE_STRING}")
endif()
find_package(LibXml2)
Modified: cfe/trunk/include/clang/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=210320&r1=210319&r2=210320&view=diff
==============================================================================
--- cfe/trunk/include/clang/Config/config.h.cmake (original)
+++ cfe/trunk/include/clang/Config/config.h.cmake Fri Jun 6 05:36:22 2014
@@ -19,4 +19,7 @@
/* Define if we have libxml2 */
#cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML}
+/* The LLVM product name and version */
+#define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}"
+
#endif
Modified: cfe/trunk/include/clang/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.in?rev=210320&r1=210319&r2=210320&view=diff
==============================================================================
--- cfe/trunk/include/clang/Config/config.h.in (original)
+++ cfe/trunk/include/clang/Config/config.h.in Fri Jun 6 05:36:22 2014
@@ -22,4 +22,9 @@
/* Define if we have libxml2 */
#undef CLANG_HAVE_LIBXML
+#undef PACKAGE_STRING
+
+/* The LLVM product name and version */
+#define BACKEND_PACKAGE_STRING PACKAGE_STRING
+
#endif
Modified: cfe/trunk/lib/Basic/Version.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Version.cpp?rev=210320&r1=210319&r2=210320&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Version.cpp (original)
+++ cfe/trunk/lib/Basic/Version.cpp Fri Jun 6 05:36:22 2014
@@ -13,7 +13,7 @@
#include "clang/Basic/Version.h"
#include "clang/Basic/LLVM.h"
-#include "llvm/Config/config.h"
+#include "clang/Config/config.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdlib>
#include <cstring>
@@ -130,7 +130,7 @@ std::string getClangToolFullVersion(Stri
// If vendor supplied, include the base LLVM version as well.
#ifdef CLANG_VENDOR
- OS << " (based on LLVM " << PACKAGE_VERSION << ")";
+ OS << " (based on " << BACKEND_PACKAGE_STRING << ")";
#endif
return OS.str();
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=210320&r1=210319&r2=210320&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Fri Jun 6 05:36:22 2014
@@ -16,6 +16,7 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
+#include "clang/Config/config.h"
#include "clang/Frontend/ChainedDiagnosticConsumer.h"
#include "clang/Frontend/FrontendAction.h"
#include "clang/Frontend/FrontendActions.h"
@@ -709,9 +710,7 @@ bool CompilerInstance::ExecuteAction(Fro
// Validate/process some options.
if (getHeaderSearchOpts().Verbose)
OS << "clang -cc1 version " CLANG_VERSION_STRING
-#ifdef PACKAGE_STRING
- << " based upon " << PACKAGE_STRING
-#endif
+ << " based upon " << BACKEND_PACKAGE_STRING
<< " default target " << llvm::sys::getDefaultTargetTriple() << "\n";
if (getFrontendOpts().ShowTimers)
More information about the cfe-commits
mailing list