2015-11-19 15:20:12 -08:00
|
|
|
#![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-12-19 08:27:23 -08:00
|
|
|
// Note that the linkage here should be all that we need, on Linux we're not
|
|
|
|
|
// prefixing the symbols here so this should naturally override our default
|
|
|
|
|
// allocator. On OSX it should override via the zone allocator. We shouldn't
|
|
|
|
|
// enable this by default on other platforms, so other platforms aren't handled
|
|
|
|
|
// here yet.
|
|
|
|
|
#[cfg(feature = "jemalloc-sys")]
|
|
|
|
|
extern crate jemalloc_sys;
|
|
|
|
|
|
2018-04-10 23:55:41 +01:00
|
|
|
fn main() {
|
|
|
|
|
rustc_driver::set_sigpipe_handler();
|
|
|
|
|
rustc_driver::main()
|
|
|
|
|
}
|