[PATCH] Add support to print version.

Rui Ueyama ruiu at google.com
Tue Oct 7 11:36:27 PDT 2014


Please update the commit message to be more descriptive.

================
Comment at: CMakeLists.txt:99
@@ +98,3 @@
+
+  execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetRepositoryPath ${LLD_SOURCE_DIR}
+                  OUTPUT_VARIABLE LLD_REPOSITORY)
----------------
shankarke wrote:
> ruiu wrote:
> > I don't think we need this. It's always https://llvm.org/svn/llvm-project/lld/trunk.
> Its a standard thing followed by other projects like lldb/clang. 
But clang doesn't have -repository-version option, no?

================
Comment at: include/lld/Config/Version.h:1
@@ +1,2 @@
+//===- Version.h - LLD Version Number ---------------------------*- C++ -*-===//
+//
----------------
shankarke wrote:
> shankarke wrote:
> > ruiu wrote:
> > > lib/Config/Version.h
> > Sure.
> The file is an include file and is included by UniversalDriver, I dont think we should keep it in lib.
What I mean is to update this line to match the path. I should've write "include/lld/Config/Version.h". Sorry.

================
Comment at: include/lld/Config/Version.h:45
@@ +44,3 @@
+/// the information in getLLDRepositoryPath() and getLLDRevision().
+std::string getLLDRepositoryVersion();
+
----------------
shankarke wrote:
> ruiu wrote:
> > We could print out revision number along with the version number like "version 3.5 (r205863)". I don't see the reason to print out repository name. Remove it?
> Same thing the style is followed by clang/lldb as well. so kept it consistent.
> 
> lldb --version 2>/dev/null
> lldb version 3.6.0 ( https://llvm.org/svn/llvm-project/lldb/trunk revision  218537)
> 
> 
OK, then let's use the same format as LLDB, instead of adding two options, -version and -repository-version, and remove remove -repository-version.

http://reviews.llvm.org/D5641






More information about the llvm-commits mailing list