@@ -65,14 +65,14 @@ pub fn source_name(input: &input) -> @str {
6565 }
6666}
6767
68- pub fn default_configuration(sess: Session, argv0: @str, input: &input ) ->
68+ pub fn default_configuration(sess: Session) ->
6969 ast::CrateConfig {
70- let (libc, tos) = match sess.targ_cfg.os {
71- session::os_win32 => (@" msvcrt . dll" , @" win32") ,
72- session :: os_macos => ( @"libc . dylib " , @" macos") ,
73- session:: os_linux => ( @"libc . so . 6 " , @" linux") ,
74- session:: os_android => ( @"libc . so " , @" android") ,
75- session:: os_freebsd => ( @"libc . so . 7 " , @" freebsd")
70+ let tos = match sess.targ_cfg.os {
71+ session::os_win32 => @" win32",
72+ session:: os_macos => @" macos",
73+ session:: os_linux => @" linux" ,
74+ session:: os_android => @" android",
75+ session:: os_freebsd => @" freebsd"
7676 } ;
7777
7878 // ARM is bi-endian, however using NDK seems to default
@@ -92,10 +92,7 @@ pub fn default_configuration(sess: Session, argv0: @str, input: &input) ->
9292 mk ( @"target_arch", arch) ,
9393 mk ( @"target_endian", end) ,
9494 mk ( @"target_word_size", wordsz) ,
95- mk ( @"target_libc", libc) ,
96- // Build bindings.
97- mk ( @"build_compiler", argv0) ,
98- mk ( @"build_input", source_name ( input) ) ] ;
95+ ] ;
9996}
10097
10198pub fn append_configuration ( cfg : & mut ast:: CrateConfig , name : @str ) {
@@ -104,11 +101,11 @@ pub fn append_configuration(cfg: &mut ast::CrateConfig, name: @str) {
104101 }
105102}
106103
107- pub fn build_configuration ( sess : Session , argv0 : @ str , input : & input ) ->
104+ pub fn build_configuration ( sess : Session ) ->
108105 ast:: CrateConfig {
109106 // Combine the configuration requested by the session (command line) with
110107 // some default and generated configuration items
111- let default_cfg = default_configuration ( sess, argv0 , input ) ;
108+ let default_cfg = default_configuration ( sess) ;
112109 let mut user_cfg = sess. opts . cfg . clone ( ) ;
113110 // If the user wants a test runner, then add the test cfg
114111 if sess. opts . test { append_configuration ( & mut user_cfg, @"test") }
@@ -980,7 +977,7 @@ pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) {
980977mod test {
981978
982979 use driver:: driver:: { build_configuration, build_session} ;
983- use driver:: driver:: { build_session_options, optgroups, str_input } ;
980+ use driver:: driver:: { build_session_options, optgroups} ;
984981
985982 use extra:: getopts:: groups:: getopts;
986983 use extra:: getopts;
@@ -998,7 +995,7 @@ mod test {
998995 let sessopts = build_session_options (
999996 @"rustc", matches, diagnostic:: emit) ;
1000997 let sess = build_session ( sessopts, diagnostic:: emit) ;
1001- let cfg = build_configuration ( sess, @"whatever" , & str_input ( @"" ) ) ;
998+ let cfg = build_configuration ( sess) ;
1002999 assert ! ( ( attr:: contains_name( cfg, "test" ) ) ) ;
10031000 }
10041001
@@ -1016,7 +1013,7 @@ mod test {
10161013 let sessopts = build_session_options (
10171014 @"rustc", matches, diagnostic:: emit) ;
10181015 let sess = build_session ( sessopts, diagnostic:: emit) ;
1019- let cfg = build_configuration ( sess, @"whatever" , & str_input ( @"" ) ) ;
1016+ let cfg = build_configuration ( sess) ;
10201017 let mut test_items = cfg. iter ( ) . filter ( |m| "test" == m. name ( ) ) ;
10211018 assert ! ( test_items. next( ) . is_some( ) ) ;
10221019 assert ! ( test_items. next( ) . is_none( ) ) ;
0 commit comments