summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-31 00:32:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-31 00:32:50 +0000
commitb1798f7b01e6e37254edbe1d649295b3231984f4 (patch)
treecbebdc975432a759d09fc4549a7ec99593172526
parent41198698aaa872fb89ff2b71aebf748b336b286f (diff)
downloadbcm5719-llvm-b1798f7b01e6e37254edbe1d649295b3231984f4.tar.gz
bcm5719-llvm-b1798f7b01e6e37254edbe1d649295b3231984f4.zip
Basic: Add support for a build variable to set the repository path that goes
into the Clang version. llvm-svn: 128595
-rw-r--r--clang/Makefile3
-rw-r--r--clang/lib/Basic/Version.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/clang/Makefile b/clang/Makefile
index 1216dadd297..b6c630aa10a 100644
--- a/clang/Makefile
+++ b/clang/Makefile
@@ -46,6 +46,9 @@ CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_
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
diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp
index 9367319c5f4..af2f848071b 100644
--- a/clang/lib/Basic/Version.cpp
+++ b/clang/lib/Basic/Version.cpp
@@ -22,6 +22,9 @@ using namespace std;
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 @@ std::string getClangRepositoryPath() {
URL = URL.substr(Start + 4);
return URL;
+#endif
}
std::string getClangRevision() {
OpenPOWER on IntegriCloud