]> git.lizzy.rs Git - rust.git/blob - src/rustc/rustc.rs
Auto merge of #57035 - Zoxc:query-pref9, r=michaelwoerister
[rust.git] / src / rustc / rustc.rs
1 #![feature(rustc_private)]
2 #![feature(link_args)]
3
4 // Set the stack size at link time on Windows. See rustc_driver::in_rustc_thread
5 // for the rationale.
6 #[allow(unused_attributes)]
7 #[cfg_attr(all(windows, target_env = "msvc"), link_args = "/STACK:16777216")]
8 // We only build for msvc and gnu now, but we use a exhaustive condition here
9 // so we can expect either the stack size to be set or the build fails.
10 #[cfg_attr(all(windows, not(target_env = "msvc")), link_args = "-Wl,--stack,16777216")]
11 // Also, don't forget to set this for rustdoc.
12 extern {}
13
14 extern crate rustc_driver;
15
16 // Note that the linkage here should be all that we need, on Linux we're not
17 // prefixing the symbols here so this should naturally override our default
18 // allocator. On OSX it should override via the zone allocator. We shouldn't
19 // enable this by default on other platforms, so other platforms aren't handled
20 // here yet.
21 #[cfg(feature = "jemalloc-sys")]
22 extern crate jemalloc_sys;
23
24 fn main() {
25     rustc_driver::set_sigpipe_handler();
26     rustc_driver::main()
27 }