about summary refs log tree commit diff
path: root/src/rustc/driver
diff options
context:
space:
mode:
authorElliott Slaughter <eslaughter@mozilla.com>2012-06-26 14:27:09 -0700
committerElliott Slaughter <eslaughter@mozilla.com>2012-08-24 14:01:27 -0700
commit7706262a730ac7bbea73decc551cdafffa8f1dbd (patch)
tree13843fbc5db4349297b157a4986dfc667c1e32c3 /src/rustc/driver
parent30768d3609d905439a129e7e9bf4571b38e321f3 (diff)
downloadrust-7706262a730ac7bbea73decc551cdafffa8f1dbd.tar.gz
rust-7706262a730ac7bbea73decc551cdafffa8f1dbd.zip
rustc: Add flag for enabling GC.
Diffstat (limited to 'src/rustc/driver')
-rw-r--r--src/rustc/driver/driver.rs2
-rw-r--r--src/rustc/driver/session.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/rustc/driver/driver.rs b/src/rustc/driver/driver.rs
index 97358154e99..087c6c3b833 100644
--- a/src/rustc/driver/driver.rs
+++ b/src/rustc/driver/driver.rs
@@ -421,6 +421,7 @@ fn build_session_options(matches: getopts::matches,
         session::unknown_crate
     };
     let static = opt_present(matches, ~"static");
+    let gc = opt_present(matches, ~"gc");
 
     let parse_only = opt_present(matches, ~"parse-only");
     let no_trans = opt_present(matches, ~"no-trans");
@@ -519,6 +520,7 @@ fn build_session_options(matches: getopts::matches,
     let sopts: @session::options =
         @{crate_type: crate_type,
           static: static,
+          gc: gc,
           optimize: opt_level,
           debuginfo: debuginfo,
           extra_debuginfo: extra_debuginfo,
diff --git a/src/rustc/driver/session.rs b/src/rustc/driver/session.rs
index 039a5b4d14a..cd663c06ce7 100644
--- a/src/rustc/driver/session.rs
+++ b/src/rustc/driver/session.rs
@@ -82,6 +82,7 @@ type options =
     // with additional crate configurations during the compile process
     {crate_type: crate_type,
      static: bool,
+     gc: bool,
      optimize: OptLevel,
      debuginfo: bool,
      extra_debuginfo: bool,
@@ -221,6 +222,7 @@ fn basic_options() -> @options {
     @{
         crate_type: session::lib_crate,
         static: false,
+        gc: false,
         optimize: No,
         debuginfo: false,
         extra_debuginfo: false,