rustc: Add a temporary option to not link to the runtime
This commit is contained in:
parent
ec0fbf526e
commit
636a849bf2
@ -631,8 +631,10 @@ fn rmext(filename: str) -> str {
|
||||
}
|
||||
}
|
||||
|
||||
// Always want the runtime linked in
|
||||
cc_args += ["-lrustrt"];
|
||||
if !sess.debugging_opt(session::no_rt) {
|
||||
// Always want the runtime linked in
|
||||
cc_args += ["-lrustrt"];
|
||||
}
|
||||
|
||||
// On linux librt and libdl are an indirect dependencies via rustrt,
|
||||
// and binutils 2.22+ won't add them automatically
|
||||
|
@ -32,6 +32,9 @@ enum crate_type { bin_crate, lib_crate, unknown_crate, }
|
||||
const no_asm_comments: uint = 32u;
|
||||
const no_verify: uint = 64u;
|
||||
const trace: uint = 128u;
|
||||
// FIXME: This exists to transition to a Rust crate runtime
|
||||
// It should be removed
|
||||
const no_rt: uint = 256u;
|
||||
|
||||
fn debugging_opts_map() -> [(str, str, uint)] {
|
||||
[("ppregions", "prettyprint regions with \
|
||||
@ -43,7 +46,9 @@ fn debugging_opts_map() -> [(str, str, uint)] {
|
||||
("stats", "gather trans statistics", stats),
|
||||
("no-asm-comments", "omit comments when using -S", no_asm_comments),
|
||||
("no-verify", "skip LLVM verification", no_verify),
|
||||
("trace", "emit trace logs", trace)]
|
||||
("trace", "emit trace logs", trace),
|
||||
("no-rt", "do not link to the runtime", no_rt)
|
||||
]
|
||||
}
|
||||
|
||||
type options =
|
||||
@ -64,7 +69,6 @@ fn debugging_opts_map() -> [(str, str, uint)] {
|
||||
test: bool,
|
||||
parse_only: bool,
|
||||
no_trans: bool,
|
||||
|
||||
debugging_opts: uint,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user