about summary refs log tree commit diff
path: root/src/librustpkg/api.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-09-10 11:41:05 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-09-10 16:42:41 -0700
commitad43613346a5702b84e3a32b39395258e32b1037 (patch)
tree6eafa1b1967045284a5cf7c952bfa64c91d1e343 /src/librustpkg/api.rs
parenta9ac27270f9ce20aaf6424f6de5128351c70659e (diff)
downloadrust-ad43613346a5702b84e3a32b39395258e32b1037.tar.gz
rust-ad43613346a5702b84e3a32b39395258e32b1037.zip
rustpkg: Pass command-line arguments to rustc
rustpkg now accepts most of rustc's command-line arguments and passes
them along to rustc when building or installing.

A few rarely-used arguments aren't implemented yet.

rustpkg doesn't support flags that don't make sense with rustpkg
(for example, --bin and --lib, which get inferred from crate file names).

Closes #8522
Diffstat (limited to 'src/librustpkg/api.rs')
-rw-r--r--src/librustpkg/api.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustpkg/api.rs b/src/librustpkg/api.rs
index 4de2572be7d..727bbcb30b4 100644
--- a/src/librustpkg/api.rs
+++ b/src/librustpkg/api.rs
@@ -29,6 +29,8 @@ pub fn default_context(p: Path) -> BuildContext {
 pub fn new_default_context(c: workcache::Context, p: Path) -> BuildContext {
     BuildContext {
         context: Context {
+            cfgs: ~[],
+            rustc_flags: RustcFlags::default(),
             use_rust_path_hack: false,
             sysroot: p
         },
@@ -44,7 +46,6 @@ fn binary_is_fresh(path: &str, in_hash: &str) -> bool {
     in_hash == digest_only_date(&Path(path))
 }
 
-
 pub fn new_workcache_context(p: &Path) -> workcache::Context {
     let db_file = p.push("rustpkg_db.json"); // ??? probably wrong
     debug!("Workcache database file: %s", db_file.to_str());