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.

llvm-svn: 286504
This commit is contained in:
Chris Bieneman 2016-11-10 21:30:16 +00:00
parent 9d62c5571b
commit 1778f69f44
4 changed files with 14 additions and 11 deletions

View File

@ -3,7 +3,7 @@ execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" ${LLD
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}")

View File

@ -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 = "";

View File

@ -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

View File

@ -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());