about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-15 18:22:31 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-15 18:22:31 +0530
commit63091efa3bdcb18a6fac8af48acfa5634087624b (patch)
tree85c38b25823c4108d76e2a75d7ce750711156e45 /src
parentb13fddda20c2e2bb8ecb0bc8c781ce24f3e4422d (diff)
parenteffad62bc5d8a0733c60ebee5faf13c24e8ce148 (diff)
downloadrust-63091efa3bdcb18a6fac8af48acfa5634087624b.tar.gz
rust-63091efa3bdcb18a6fac8af48acfa5634087624b.zip
Rollup merge of #22201 - brson:version, r=nick29581
rustc --version says

```
rustc 1.0.0-dev (d0e82a68a 2015-02-05 14:38:56 -0800) (built 2015-02-11)
```
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index b087c0c2aa1..50a68e8f1e3 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -477,6 +477,10 @@ pub fn commit_date_str() -> Option<&'static str> {
     option_env!("CFG_VER_DATE")
 }
 
+pub fn build_date_str() -> Option<&'static str> {
+    option_env!("CFG_BUILD_DATE")
+}
+
 /// Prints version information and returns None on success or an error
 /// message on panic.
 pub fn version(binary: &str, matches: &getopts::Matches) {
@@ -488,6 +492,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
         println!("binary: {}", binary);
         println!("commit-hash: {}", unw(commit_hash_str()));
         println!("commit-date: {}", unw(commit_date_str()));
+        println!("build-date: {}", unw(build_date_str()));
         println!("host: {}", config::host_triple());
         println!("release: {}", unw(release_str()));
     }