diff options
Diffstat (limited to 'src/librustc/driver/session.rs')
| -rw-r--r-- | src/librustc/driver/session.rs | 51 |
1 files changed, 21 insertions, 30 deletions
diff --git a/src/librustc/driver/session.rs b/src/librustc/driver/session.rs index 15067b785d9..3b9bbbb9f1c 100644 --- a/src/librustc/driver/session.rs +++ b/src/librustc/driver/session.rs @@ -63,6 +63,7 @@ pub static jit: uint = 1 << 19; pub static debug_info: uint = 1 << 20; pub static extra_debug_info: uint = 1 << 21; pub static static: uint = 1 << 22; +pub static print_link_args: uint = 1 << 23; pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] { ~[(~"verbose", ~"in general, enable more debug printouts", verbose), @@ -90,6 +91,7 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] { (~"no-opt", ~"do not optimize, even if -O is passed", no_opt), (~"no-monomorphic-collapse", ~"do not collapse template instantiations", no_monomorphic_collapse), + (~"print-link-args", ~"Print the arguments passed to the linker", print_link_args), (~"gc", ~"Garbage collect shared data (experimental)", gc), (~"jit", ~"Execute using JIT (experimental)", jit), (~"extra-debug-info", ~"Extra debugging info (experimental)", @@ -122,7 +124,9 @@ pub struct options { jit: bool, output_type: back::link::output_type, addl_lib_search_paths: ~[Path], - maybe_sysroot: Option<Path>, + linker: Option<~str>, + linker_args: ~[~str], + maybe_sysroot: Option<@Path>, target_triple: ~str, target_feature: ~str, // User-specified cfg meta items. The compiler itself will add additional @@ -172,20 +176,16 @@ pub struct Session_ { pub type Session = @Session_; pub impl Session_ { - fn span_fatal(@self, sp: span, msg: ~str) -> ! { - debug!("span_fatal invoked: %s", msg); + fn span_fatal(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_fatal(sp, msg) } - fn fatal(@self, msg: ~str) -> ! { - debug!("fatal invoked: %s", msg); + fn fatal(@self, msg: &str) -> ! { self.span_diagnostic.handler().fatal(msg) } - fn span_err(@self, sp: span, msg: ~str) { - debug!("span_err invoked: %s", msg); + fn span_err(@self, sp: span, msg: &str) { self.span_diagnostic.span_err(sp, msg) } - fn err(@self, msg: ~str) { - debug!("err invoked: %s", msg); + fn err(@self, msg: &str) { self.span_diagnostic.handler().err(msg) } fn has_errors(@self) -> bool { @@ -194,35 +194,31 @@ pub impl Session_ { fn abort_if_errors(@self) { self.span_diagnostic.handler().abort_if_errors() } - fn span_warn(@self, sp: span, msg: ~str) { - debug!("span_warn invoked: %s", msg); + fn span_warn(@self, sp: span, msg: &str) { self.span_diagnostic.span_warn(sp, msg) } - fn warn(@self, msg: ~str) { - debug!("warn invoked: %s", msg); + fn warn(@self, msg: &str) { self.span_diagnostic.handler().warn(msg) } - fn span_note(@self, sp: span, msg: ~str) { - debug!("span_note invoked: %s", msg); + fn span_note(@self, sp: span, msg: &str) { self.span_diagnostic.span_note(sp, msg) } - fn note(@self, msg: ~str) { - debug!("note invoked: %s", msg); + fn note(@self, msg: &str) { self.span_diagnostic.handler().note(msg) } - fn span_bug(@self, sp: span, msg: ~str) -> ! { + fn span_bug(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_bug(sp, msg) } - fn bug(@self, msg: ~str) -> ! { + fn bug(@self, msg: &str) -> ! { self.span_diagnostic.handler().bug(msg) } - fn span_unimpl(@self, sp: span, msg: ~str) -> ! { + fn span_unimpl(@self, sp: span, msg: &str) -> ! { self.span_diagnostic.span_unimpl(sp, msg) } - fn unimpl(@self, msg: ~str) -> ! { + fn unimpl(@self, msg: &str) -> ! { self.span_diagnostic.handler().unimpl(msg) } - fn span_lint_level(@self, level: lint::level, sp: span, msg: ~str) { + fn span_lint_level(@self, level: lint::level, sp: span, msg: &str) { match level { lint::allow => { }, lint::warn => self.span_warn(sp, msg), @@ -235,7 +231,7 @@ pub impl Session_ { expr_id: ast::node_id, item_id: ast::node_id, span: span, - msg: ~str) { + msg: &str) { let level = lint::get_lint_settings_level( self.lint_settings, lint_mode, expr_id, item_id); self.span_lint_level(level, span, msg); @@ -307,6 +303,8 @@ pub fn basic_options() -> @options { jit: false, output_type: link::output_type_exe, addl_lib_search_paths: ~[], + linker: None, + linker_args: ~[], maybe_sysroot: None, target_triple: host_triple(), target_feature: ~"", @@ -434,10 +432,3 @@ mod test { assert!(building_library(lib_crate, crate, true)); } } - -// Local Variables: -// fill-column: 78; -// indent-tabs-mode: nil -// c-basic-offset: 4 -// buffer-file-coding-system: utf-8-unix -// End: |
