srhines created this revision.
Herald added subscribers: cfe-commits, hintonda, mgorny.
srhines added a reviewer: beanz.
Without this, vendor Clang builds can occasionally pick up an arbitrary
mirror location for the repository (at least on Android builds). This
allows vendor builds to be more reproducible.
Repository:
rC Clang
https://reviews.llvm.org/D42676
Files:
CMakeLists.txt
lib/Basic/Version.cpp
Index: lib/Basic/Version.cpp
===================================================================
--- lib/Basic/Version.cpp
+++ lib/Basic/Version.cpp
@@ -55,6 +55,9 @@
}
std::string getLLVMRepositoryPath() {
+#if defined(LLVM_REPOSITORY_STRING)
+ return LLVM_REPOSITORY_STRING;
+#else
#ifdef LLVM_REPOSITORY
StringRef URL(LLVM_REPOSITORY);
#else
@@ -69,6 +72,7 @@
URL = URL.substr(Start);
return URL;
+#endif
}
std::string getClangRevision() {
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -267,6 +267,13 @@
add_definitions(-DCLANG_REPOSITORY_STRING="${CLANG_REPOSITORY_STRING}")
endif()
+set(LLVM_REPOSITORY_STRING "" CACHE STRING
+ "Vendor-specific text for showing the repository the LLVM source is taken
from.")
+
+if(LLVM_REPOSITORY_STRING)
+ add_definitions(-DLLVM_REPOSITORY_STRING="${LLVM_REPOSITORY_STRING}")
+endif()
+
set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
"Vendor-specific uti.")
Index: lib/Basic/Version.cpp
===================================================================
--- lib/Basic/Version.cpp
+++ lib/Basic/Version.cpp
@@ -55,6 +55,9 @@
}
std::string getLLVMRepositoryPath() {
+#if defined(LLVM_REPOSITORY_STRING)
+ return LLVM_REPOSITORY_STRING;
+#else
#ifdef LLVM_REPOSITORY
StringRef URL(LLVM_REPOSITORY);
#else
@@ -69,6 +72,7 @@
URL = URL.substr(Start);
return URL;
+#endif
}
std::string getClangRevision() {
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -267,6 +267,13 @@
add_definitions(-DCLANG_REPOSITORY_STRING="${CLANG_REPOSITORY_STRING}")
endif()
+set(LLVM_REPOSITORY_STRING "" CACHE STRING
+ "Vendor-specific text for showing the repository the LLVM source is taken from.")
+
+if(LLVM_REPOSITORY_STRING)
+ add_definitions(-DLLVM_REPOSITORY_STRING="${LLVM_REPOSITORY_STRING}")
+endif()
+
set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
"Vendor-specific uti.")
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits