[cfe-commits] r128595 - in /cfe/trunk: Makefile lib/Basic/Version.cpp
Daniel Dunbar
daniel at zuster.org
Wed Mar 30 17:32:50 PDT 2011
Author: ddunbar
Date: Wed Mar 30 19:32:50 2011
New Revision: 128595
URL: http://llvm.org/viewvc/llvm-project?rev=128595&view=rev
Log:
Basic: Add support for a build variable to set the repository path that goes
into the Clang version.
Modified:
cfe/trunk/Makefile
cfe/trunk/lib/Basic/Version.cpp
Modified: cfe/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Makefile?rev=128595&r1=128594&r2=128595&view=diff
==============================================================================
--- cfe/trunk/Makefile (original)
+++ cfe/trunk/Makefile Wed Mar 30 19:32:50 2011
@@ -46,6 +46,9 @@
ifdef CLANG_VENDOR
CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
endif
+ifdef CLANG_REPOSITORY_STRING
+CPP.Flags += -DCLANG_REPOSITORY_STRING='"$(CLANG_REPOSITORY_STRING)"'
+endif
# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
# work with it enabled with GCC), Clang/llvm-gcc don't support it yet, and newer
Modified: cfe/trunk/lib/Basic/Version.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Version.cpp?rev=128595&r1=128594&r2=128595&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Version.cpp (original)
+++ cfe/trunk/lib/Basic/Version.cpp Wed Mar 30 19:32:50 2011
@@ -22,6 +22,9 @@
namespace clang {
std::string getClangRepositoryPath() {
+#if defined(CLANG_REPOSITORY_STRING)
+ return CLANG_REPOSITORY_STRING;
+#else
#ifdef SVN_REPOSITORY
llvm::StringRef URL(SVN_REPOSITORY);
#else
@@ -45,6 +48,7 @@
URL = URL.substr(Start + 4);
return URL;
+#endif
}
std::string getClangRevision() {
More information about the cfe-commits
mailing list