[llvm] r228669 - Define HAVE_DIA_SDK on Windows when DIA is present.
Zachary Turner
zturner at google.com
Mon Feb 9 21:04:25 PST 2015
Author: zturner
Date: Mon Feb 9 23:04:25 2015
New Revision: 228669
URL: http://llvm.org/viewvc/llvm-project?rev=228669&view=rev
Log:
Define HAVE_DIA_SDK on Windows when DIA is present.
This allows all CMake projects, as well as C++ code, to detect if
and when DIA SDK is available for use so that we can enable the
DIA-based PDB reader implementation.
Differential Revision: http://reviews.llvm.org/D7457
Reviewed By: Chandler Carruth
Modified:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/include/llvm/Config/config.h.in
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=228669&r1=228668&r2=228669&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Mon Feb 9 23:04:25 2015
@@ -429,6 +429,22 @@ if( MSVC )
set(SHLIBEXT ".lib")
set(stricmp "_stricmp")
set(strdup "_strdup")
+
+ # See if the DIA SDK is available and usable.
+ set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")
+
+ # Due to a bug in MSVC 2013's installation software, it is possible
+ # for MSVC 2013 to write the DIA SDK into the Visual Studio 2012
+ # install directory. If this happens, the installation is corrupt
+ # and there's nothing we can do. It happens with enough frequency
+ # though that we should handle it. We do so by simply checking that
+ # the DIA SDK folder exists. Should this happen you will need to
+ # uninstall VS 2012 and then re-install VS 2013.
+ if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR})
+ set(HAVE_DIA_SDK 1)
+ else()
+ set(HAVE_DIA_SDK 0)
+ endif()
endif( MSVC )
if( PURE_WINDOWS )
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=228669&r1=228668&r2=228669&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Mon Feb 9 23:04:25 2015
@@ -55,6 +55,9 @@
don't. */
#cmakedefine01 HAVE_DECL_STRERROR_S
+/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
+#cmakedefine HAVE_DIA_SDK ${HAVE_DIA_SDK}
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#cmakedefine HAVE_DIRENT_H ${HAVE_DIRENT_H}
Modified: llvm/trunk/include/llvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=228669&r1=228668&r2=228669&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.in (original)
+++ llvm/trunk/include/llvm/Config/config.h.in Mon Feb 9 23:04:25 2015
@@ -67,6 +67,9 @@
don't. */
#undef HAVE_DECL_STRERROR_S
+/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
+#undef HAVE_DIA_SDK
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
More information about the llvm-commits
mailing list