summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-11-10 21:30:16 +0000
committerChris Bieneman <beanz@apple.com>2016-11-10 21:30:16 +0000
commit1778f69f4492d6d0b1be45186bbe2d2d1e6110fa (patch)
tree20286742b2d2ddfb94eec4d6e9230ceff6e5c367
parent9d62c5571bd435e087be5247caed530247faf552 (diff)
downloadbcm5719-llvm-1778f69f4492d6d0b1be45186bbe2d2d1e6110fa.tar.gz
bcm5719-llvm-1778f69f4492d6d0b1be45186bbe2d2d1e6110fa.zip
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
-rw-r--r--lldb/cmake/modules/EmbedAppleVersion.cmake2
-rw-r--r--lldb/lldb.xcodeproj/project.pbxproj16
-rw-r--r--lldb/source/CMakeLists.txt2
-rw-r--r--lldb/source/lldb.cpp5
4 files changed, 14 insertions, 11 deletions
diff --git a/lldb/cmake/modules/EmbedAppleVersion.cmake b/lldb/cmake/modules/EmbedAppleVersion.cmake
index caa3be06759..57f5eba45e4 100644
--- a/lldb/cmake/modules/EmbedAppleVersion.cmake
+++ b/lldb/cmake/modules/EmbedAppleVersion.cmake
@@ -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}")
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj
index bfa4dce37ae..16afa7dd2db 100644
--- a/lldb/lldb.xcodeproj/project.pbxproj
+++ b/lldb/lldb.xcodeproj/project.pbxproj
@@ -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 = "";
diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt
index 0989a4a3970..d3d3c8bb79a 100644
--- a/lldb/source/CMakeLists.txt
+++ b/lldb/source/CMakeLists.txt
@@ -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
diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp
index d283896a33c..3817dd4574e 100644
--- a/lldb/source/lldb.cpp
+++ b/lldb/source/lldb.cpp
@@ -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());
OpenPOWER on IntegriCloud