]> git.lizzy.rs Git - rust.git/blob - src/rustc/rustc.rs
Rollup merge of #57085 - glaubitz:sparc64-abi-fix, r=nagisa
[rust.git] / src / rustc / rustc.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![feature(rustc_private)]
12 #![feature(link_args)]
13
14 // Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread
15 // for the rationale.
16 #[allow(unused_attributes)]
17 #[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
18 // We only build for msvc and gnu now, but we use a exhaustive condition here
19 // so we can expect either the stack size to be set or the build fails.
20 #[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
21 // Also, don't forget to set this for rustdoc.
22 extern {}
23
24 extern crate rustc_driver;
25
26 // Note that the linkage here should be all that we need, on Linux we're not
27 // prefixing the symbols here so this should naturally override our default
28 // allocator. On OSX it should override via the zone allocator. We shouldn't
29 // enable this by default on other platforms, so other platforms aren't handled
30 // here yet.
31 #[cfg(feature = "jemalloc-sys")]
32 extern crate jemalloc_sys;
33
34 fn main() {
35     rustc_driver::set_sigpipe_handler();
36     rustc_driver::main()
37 }