rustpkg: Begin allowing package scripts to call the default build logic
rustpkg/api.rs provides functions intended for package scripts to call. It will probably need more functionality added to it later, but this is a start. Added a test case checking that a package script can use the API. Closes #6401
This commit is contained in:
parent
22408d9ad5
commit
3789433b4f
7 changed files with 166 additions and 22 deletions
|
@ -257,7 +257,7 @@ pub fn compile_input(ctxt: &Ctx,
|
|||
|
||||
debug!("calling compile_crate_from_input, out_dir = %s,
|
||||
building_library = %?", out_dir.to_str(), sess.building_library);
|
||||
compile_crate_from_input(&input, out_dir, sess, crate, copy cfg);
|
||||
compile_crate_from_input(&input, out_dir, sess, crate, copy cfg, driver::cu_expand);
|
||||
true
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,8 @@ pub fn compile_crate_from_input(input: &driver::input,
|
|||
build_dir: &Path,
|
||||
sess: session::Session,
|
||||
crate: @ast::crate,
|
||||
cfg: ast::crate_cfg) {
|
||||
cfg: ast::crate_cfg,
|
||||
compile_from: driver::compile_phase) {
|
||||
debug!("Calling build_output_filenames with %s, building library? %?",
|
||||
build_dir.to_str(), sess.building_library);
|
||||
|
||||
|
@ -287,7 +288,7 @@ pub fn compile_crate_from_input(input: &driver::input,
|
|||
driver::compile_rest(sess,
|
||||
cfg,
|
||||
compile_upto {
|
||||
from: driver::cu_expand,
|
||||
from: compile_from,
|
||||
to: driver::cu_everything
|
||||
},
|
||||
Some(outputs),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue