[Lldb-commits] [lldb] r286504 - Fixing the Xcode build that I broke in r286479

Chris Bieneman via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 10 13:30:16 PST 2016


Author: cbieneman
Date: Thu Nov 10 15:30:16 2016
New Revision: 286504

URL: http://llvm.org/viewvc/llvm-project?rev=286504&view=rev
Log:
Fixing the Xcode build that I broke in r286479

Since Xcode can't seem to handle quotes in preprocessor definitions, I've changed the build to assume that the define is unquoted. This should fix the failing Darwin bots.

Modified:
    lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/source/CMakeLists.txt
    lldb/trunk/source/lldb.cpp

Modified: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286504&r1=286503&r2=286504&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (original)
+++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 15:30:16 2016
@@ -3,7 +3,7 @@ execute_process(COMMAND /usr/libexec/Pli
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 file(APPEND "${HEADER_FILE}.tmp"
-    "#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
+    "#define LLDB_VERSION_STRING lldb-${BundleVersion}\n")
 
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
   "${HEADER_FILE}.tmp" "${HEADER_FILE}")

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286504&r1=286503&r2=286504&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 15:30:16 2016
@@ -8779,7 +8779,7 @@
 					__STDC_CONSTANT_MACROS,
 					__STDC_LIMIT_MACROS,
 					LLDB_CONFIGURATION_DEBUG,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
 					__STDC_CONSTANT_MACROS,
@@ -8787,7 +8787,7 @@
 					LLDB_CONFIGURATION_DEBUG,
 					LLDB_DISABLE_PYTHON,
 					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				HEADER_SEARCH_PATHS = /usr/include/libxml2;
 				LLDB_COMPRESSION_CFLAGS = "";
@@ -8838,7 +8838,7 @@
 					__STDC_CONSTANT_MACROS,
 					__STDC_LIMIT_MACROS,
 					LLDB_CONFIGURATION_RELEASE,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
 					__STDC_CONSTANT_MACROS,
@@ -8846,7 +8846,7 @@
 					LLDB_CONFIGURATION_RELEASE,
 					LLDB_DISABLE_PYTHON,
 					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				HEADER_SEARCH_PATHS = /usr/include/libxml2;
 				LLDB_COMPRESSION_CFLAGS = "";
@@ -8897,7 +8897,7 @@
 					__STDC_CONSTANT_MACROS,
 					__STDC_LIMIT_MACROS,
 					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
 					__STDC_CONSTANT_MACROS,
@@ -8905,7 +8905,7 @@
 					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
 					LLDB_DISABLE_PYTHON,
 					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				HEADER_SEARCH_PATHS = /usr/include/libxml2;
 				LLDB_COMPRESSION_CFLAGS = "";
@@ -9910,7 +9910,7 @@
 					__STDC_CONSTANT_MACROS,
 					__STDC_LIMIT_MACROS,
 					LLDB_CONFIGURATION_DEBUG,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
 					__STDC_CONSTANT_MACROS,
@@ -9918,7 +9918,7 @@
 					LLDB_CONFIGURATION_DEBUG,
 					LLDB_DISABLE_PYTHON,
 					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+					LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
 				);
 				HEADER_SEARCH_PATHS = /usr/include/libxml2;
 				LLDB_COMPRESSION_CFLAGS = "";

Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=286504&r1=286503&r2=286504&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Thu Nov 10 15:30:16 2016
@@ -84,7 +84,7 @@ if(APPLE)
   list(APPEND lldbBase_SOURCES ${apple_version_inc})
 elseif(LLDB_VERSION_STRING)
   set_source_files_properties(lldb.cpp
-    PROPERTIES COMPILE_DEFINITIONS "LLDB_VERSION_STRING=\"${LLDB_VERSION_STRING}\"")
+    PROPERTIES COMPILE_DEFINITIONS "LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
 endif()
 
 add_lldb_library(lldbBase

Modified: lldb/trunk/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=286504&r1=286503&r2=286504&view=diff
==============================================================================
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Thu Nov 10 15:30:16 2016
@@ -39,6 +39,9 @@ static const char *GetLLDBRepository() {
 }
 
 
+#define QUOTE(str) #str
+#define EXPAND_AND_QUOTE(str) QUOTE(str)
+
 const char *lldb_private::GetVersion() {
   // On platforms other than Darwin, report a version number in the same style
   // as the clang tool.
@@ -60,7 +63,7 @@ const char *lldb_private::GetVersion() {
     }
 #ifdef LLDB_VERSION_STRING
     g_version_str += " (";
-    g_version_str += LLDB_VERSION_STRING;
+    g_version_str += EXPAND_AND_QUOTE(LLDB_VERSION_STRING);
     g_version_str += ")";
 #endif
     std::string clang_rev(clang::getClangRevision());




More information about the lldb-commits mailing list