extern crate rustc_typeck;
extern crate test;
+// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
+// about jemalloc.
#[cfg(feature = "jemalloc")]
extern crate tikv_jemalloc_sys;
#[cfg(feature = "jemalloc")]
use tikv_jemalloc_sys as jemalloc_sys;
-#[cfg(feature = "jemalloc")]
-extern crate tikv_jemallocator;
-#[cfg(feature = "jemalloc")]
-use tikv_jemallocator as jemallocator;
use std::default::Default;
use std::env;
mod visit_ast;
mod visit_lib;
-// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
-// about jemallocator
-#[cfg(feature = "jemalloc")]
-#[global_allocator]
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
-
pub fn main() {
// See docs in https://github.com/rust-lang/rust/blob/master/compiler/rustc/src/main.rs
- // about jemalloc-sys
+ // about jemalloc.
#[cfg(feature = "jemalloc")]
{
use std::os::raw::{c_int, c_void};
#[used]
static _F6: unsafe extern "C" fn(*mut c_void) = jemalloc_sys::free;
- // On OSX, jemalloc doesn't directly override malloc/free, but instead
- // registers itself with the allocator's zone APIs in a ctor. However,
- // the linker doesn't seem to consider ctors as "used" when statically
- // linking, so we need to explicitly depend on the function.
#[cfg(target_os = "macos")]
{
extern "C" {
stable("h", |o| o.optflagmulti("h", "help", "show this help message")),
stable("V", |o| o.optflagmulti("V", "version", "print rustdoc's version")),
stable("v", |o| o.optflagmulti("v", "verbose", "use verbose output")),
- stable("r", |o| {
- o.optopt("r", "input-format", "the input type of the specified file", "[rust]")
- }),
stable("w", |o| o.optopt("w", "output-format", "the output type to write", "[html]")),
stable("output", |o| {
o.optopt(
"give precedence to `--extern-html-root-url`, not `html_root_url`",
)
}),
- stable("plugin-path", |o| o.optmulti("", "plugin-path", "removed", "DIR")),
stable("C", |o| {
o.optmulti("C", "codegen", "pass a codegen option to rustc", "OPT[=VALUE]")
}),
- stable("passes", |o| {
- o.optmulti(
- "",
- "passes",
- "list of passes to also run, you might want to pass it multiple times; a value of \
- `list` will print available passes",
- "PASSES",
- )
- }),
- stable("plugins", |o| o.optmulti("", "plugins", "removed", "PLUGINS")),
- stable("no-default", |o| o.optflagmulti("", "no-defaults", "don't run the default passes")),
stable("document-private-items", |o| {
o.optflagmulti("", "document-private-items", "document private items")
}),
"path to function call information (for displaying examples in the documentation)",
)
}),
+ // deprecated / removed options
+ stable("plugin-path", |o| {
+ o.optmulti(
+ "",
+ "plugin-path",
+ "removed, see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+ for more information",
+ "DIR",
+ )
+ }),
+ stable("passes", |o| {
+ o.optmulti(
+ "",
+ "passes",
+ "removed, see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+ for more information",
+ "PASSES",
+ )
+ }),
+ stable("plugins", |o| {
+ o.optmulti(
+ "",
+ "plugins",
+ "removed, see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+ for more information",
+ "PLUGINS",
+ )
+ }),
+ stable("no-default", |o| {
+ o.optflagmulti(
+ "",
+ "no-defaults",
+ "removed, see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+ for more information",
+ )
+ }),
+ stable("r", |o| {
+ o.optopt(
+ "r",
+ "input-format",
+ "removed, see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
+ for more information",
+ "[rust]",
+ )
+ }),
]
}
// plug/cleaning passes.
let crate_version = options.crate_version.clone();
- let default_passes = options.default_passes;
let output_format = options.output_format;
// FIXME: fix this clone (especially render_options)
let externs = options.externs.clone();
- let manual_passes = options.manual_passes.clone();
let render_options = options.render_options.clone();
let scrape_examples_options = options.scrape_examples_options.clone();
let config = core::create_config(options);
core::run_global_ctxt(
tcx,
resolver,
- default_passes,
- manual_passes,
+ show_coverage,
render_options,
output_format,
)