Move used_link_args from session to cstore
This commit is contained in:
parent
4bfa269fe7
commit
58d288a4f7
4 changed files with 12 additions and 10 deletions
|
|
@ -188,7 +188,7 @@ fn visit_item(env e, &@ast::item i) {
|
|||
attr::find_attrs_by_name(i.attrs, "link_args")) {
|
||||
alt (attr::get_meta_item_value_str(attr::attr_meta(a))) {
|
||||
case (some(?linkarg)) {
|
||||
e.sess.add_used_link_args(linkarg);
|
||||
cstore::add_used_link_args(cstore, linkarg);
|
||||
}
|
||||
case (none) { /* fallthrough */ }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import std::map;
|
||||
import std::vec;
|
||||
import std::str;
|
||||
|
||||
type crate_metadata = rec(str name, vec[u8] data);
|
||||
|
||||
|
|
@ -53,6 +54,14 @@ fn get_used_libraries(&cstore cstore) -> vec[str] {
|
|||
ret cstore.used_libraries;
|
||||
}
|
||||
|
||||
fn add_used_link_args(&cstore cstore, &str args) {
|
||||
cstore.used_link_args += str::split(args, ' ' as u8);
|
||||
}
|
||||
|
||||
fn get_used_link_args(&cstore cstore) -> vec[str] {
|
||||
ret cstore.used_link_args;
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust
|
||||
// fill-column: 78;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue