2015-11-19 15:20:12 -08:00
|
|
|
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
#![feature(rustc_private)]
|
2018-03-06 13:33:36 +09:00
|
|
|
#![feature(link_args)]
|
|
|
|
|
|
|
|
// Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread
|
|
|
|
// for the rationale.
|
2018-04-09 11:21:43 -06:00
|
|
|
#[allow(unused_attributes)]
|
2018-03-06 13:33:36 +09:00
|
|
|
#[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
|
|
|
|
// We only build for msvc and gnu now, but we use a exhaustive condition here
|
|
|
|
// so we can expect either the stack size to be set or the build fails.
|
|
|
|
#[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
|
2018-03-28 18:51:25 +09:00
|
|
|
// Also, don't forget to set this for rustdoc.
|
2018-03-06 13:33:36 +09:00
|
|
|
extern {}
|
2015-11-19 15:20:12 -08:00
|
|
|
|
|
|
|
extern crate rustc_driver;
|
|
|
|
|
2018-04-10 23:55:41 +01:00
|
|
|
fn main() {
|
|
|
|
rustc_driver::set_sigpipe_handler();
|
|
|
|
rustc_driver::main()
|
|
|
|
}
|