]> git.lizzy.rs Git - rust.git/blob - src/rustc/rustc.rs
Rollup merge of #49606 - varkor:pipe-repair, r=alexcrichton
[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 fn main() {
27     rustc_driver::set_sigpipe_handler();
28     rustc_driver::main()
29 }