auto merge of #12084 : alexcrichton/rust/codegen-opts, r=cmr

Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.

The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.

Flags affected:

* --llvm-args           => -C llvm-args
* --passes              => -C passes
* --ar                  => -C ar
* --linker              => -C linker
* --link-args           => -C link-args
* --target-cpu          => -C target-cpu
* --target-feature      => -C target-fature
* --android-cross-path  => -C android-cross-path
* --save-temps          => -C save-temps
* --no-rpath            => -C no-rpath
* -Z no-prepopulate     => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp   => -C no-vectorize-slp
* -Z soft-float         => -C soft-float
* -Z gen-crate-map      => -C gen-crate-map
* -Z prefer-dynamic     => -C prefer-dynamic
* -Z no-integrated-as   => -C no-integrated-as

As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.

* -Z debug-info         => removed
* -Z extra-debug-info   => -g or --debuginfo

Closes #9770
Closes #12000
This commit is contained in:
bors 2014-02-10 01:26:24 -08:00
commit d440a569bb
112 changed files with 393 additions and 302 deletions

View File

@ -141,7 +141,7 @@ endif
# worry about the distribution of one file (with its native dynamic
# dependencies)
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
RUSTFLAGS_STAGE1 += -Z prefer-dynamic
RUSTFLAGS_STAGE1 += -C prefer-dynamic
# platform-specific auto-configuration
include $(CFG_SRC_DIR)mk/platform.mk

View File

@ -27,18 +27,15 @@ Display this message
\fB\-L\fR PATH
Add a directory to the library search path
.TP
\fB\-\-linker\fR LINKER
Program to use for linking instead of the default
.TP
\fB\-\-link-args\fR FLAGS
A space-separated list of flags passed to the linker
.TP
\fB\-\-ls\fR
List the symbols defined by a library crate
.TP
\fB\-\-no\-trans\fR
Run all passes except translation; no output
.TP
\fB\-g\fR, \fB\-\-debuginfo\fR
Emit DWARF debug information into object files generated.
.TP
\fB\-O\fR
Equivalent to \fI\-\-opt\-level=2\fR
.TP
@ -48,11 +45,6 @@ Write output to <filename>. Ignored if more than one --emit is specified.
\fB\-\-opt\-level\fR LEVEL
Optimize with possible levels 0-3
.TP
\fB\-\-passes\fR NAMES
Comma- or space-separated list of optimization passes. Overrides
the default passes for the optimization level. A value of 'list'
will list the available passes.
.TP
\fB\-\-out\-dir\fR DIR
Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
(default the current directory)
@ -66,9 +58,6 @@ Pretty-print the input instead of compiling; valid types are: normal
expanded, with type annotations), or identified (fully parenthesized,
AST nodes and blocks with IDs)
.TP
\fB\-\-save\-temps\fR
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
.TP
\fB\-\-sysroot\fR PATH
Override the system root
.TP
@ -80,12 +69,6 @@ Target triple cpu-manufacturer-kernel[-os] to compile for (see
http://sources.redhat.com/autobook/autobook/autobook_17.html
for details)
.TP
\fB\-\-target-feature\fR TRIPLE
Target-specific attributes (see llc -mattr=help for details)
.TP
\fB\-\-android-cross-path\fR PATH
The path to the Android NDK
.TP
\fB\-W\fR help
Print 'lint' options and default settings
.TP
@ -104,9 +87,80 @@ Set lint forbidden
\fB\-Z\fR FLAG
Set internal debugging options. Use "-Z help" to print available options.
.TP
\fB\-C\fR FLAG[=VAL], \fB\-\-codegen\fR FLAG[=VAL]
Set a codegen-related flag to the value specifie.d Use "-C help" to print
available flags. See CODEGEN OPTIONS below
.TP
\fB\-v\fR, \fB\-\-version\fR
Print version info and exit
.SH CODEGEN OPTIONS
.TP
\fBar\fR=/path/to/ar
Path to the archive utility to use when assembling archives.
.TP
\fBlinker\fR=/path/to/cc
Path to the linker utility to use when linking libraries, executables, and
objects.
.TP
\fBlink-args\fR='-flag1 -flag2'
A space-separated list of extra arguments to pass to the linker when the linker
is invoked.
.TP
\fBtarget-cpu\fR=help
Selects a target processor. If the value is 'help', then a list of available
cpus is printed.
.TP
\fBtarget-feature\fR='+feature1 -feature2'
A space-separated list of features to enable or disable for the target. A
preceding '+' enables a feature while a preceding '-' disables it. Available
features can be discovered through target-cpu=help.
.TP
\fBpasses\fR=list
A space-separated list of extra LLVM passes to run. A value of 'list' will
cause rustc to print all known passes and exit. The passes specified are
appended at the end of the normal pass manager.
.TP
\fBllvm-args\fR='-arg1 -arg2'
A space-separted list of argument to pass through to LLVM.
.TP
\fBsave-temps\fR
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
throughout compilation in the output directory.
.TP
\fBandroid-cross-path\fR=path/to/ndk/bin
Directory to find the Android NDK cross-compilation tools
.TP
\fBno-rpath\fR
If specified, then the rpath value for dynamic libraries will not be set in
either dynamic library or executable outputs.
.TP
\fBno-prepopulate-passes\fR
Suppresses pre-population of the LLVM pass manager that is run over the module.
.TP
\fBno-vectorize-loops\fR
Suppresses running the loop vectorization LLVM pass, regardless of optimization
level.
.TP
\fBno-vectorize-slp\fR
Suppresses running the LLVM SLP vectorization pass, regardless of optimization
level.
.TP
\fBsoft-float\fR
Generates software floating point library calls instead of hardware
instructions.
.TP
\fBgen-crate-map\fR
Forces generate of a toplevel crate map. May be required for logging to work
when rust is embedded into another application.
.TP
\fBprefer-dynamic\fR
Prefers dynamic linking to static linking.
.TP
\fBno-integrated-as\fR
Force usage of an external assembler rather than LLVM's integrated one.
.SH "EXAMPLES"
To build an executable from a source file with a main function:
$ rustc -o hello hello.rs
@ -117,8 +171,8 @@ To build a library from a source file:
To build either with a crate (.rs) file:
$ rustc hello.rs
To build an executable with debug info (experimental):
$ rustc -Z debug-info -o hello hello.rs
To build an executable with debug info:
$ rustc -g -o hello hello.rs
.SH "SEE ALSO"

View File

@ -300,8 +300,8 @@ CFG_PATH_MUNGE_arm-linux-androideabi := true
CFG_LDPATH_arm-linux-androideabi :=
CFG_RUN_arm-linux-androideabi=
CFG_RUN_TARG_arm-linux-androideabi=
RUSTC_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
RUSTC_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
# arm-unknown-linux-gnueabihf configuration
CROSS_PREFIX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-

View File

@ -530,7 +530,7 @@ CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
# There's no need our entire test suite to take up gigabytes of space on disk
# including copies of libstd/libextra all over the place
CTEST_RUSTC_FLAGS := $$(CTEST_RUSTC_FLAGS) -Z prefer-dynamic
CTEST_RUSTC_FLAGS := $$(CTEST_RUSTC_FLAGS) -C prefer-dynamic
# The tests can not be optimized while the rest of the compiler is optimized, so
# filter out the optimization (if any) from rustc and then figure out if we need

View File

@ -332,8 +332,8 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
let args = split_maybe_args(&config.rustcflags);
let mut tool_path:~str = ~"";
for arg in args.iter() {
if arg.contains("--android-cross-path=") {
tool_path = arg.replace("--android-cross-path=","");
if arg.contains("android-cross-path=") {
tool_path = arg.replace("android-cross-path=","");
break;
}
}
@ -1054,7 +1054,7 @@ fn compile_test_and_save_bitcode(config: &config, props: &TestProps,
let aux_dir = aux_output_dir_name(config, testfile);
// FIXME (#9639): This needs to handle non-utf8 paths
let link_args = ~[~"-L", aux_dir.as_str().unwrap().to_owned()];
let llvm_args = ~[~"--emit=obj", ~"--crate-type=lib", ~"--save-temps"];
let llvm_args = ~[~"--emit=obj", ~"--crate-type=lib", ~"-C", ~"save-temps"];
let args = make_compile_args(config, props,
link_args + llvm_args,
|a, b| ThisFile(make_o_name(a, b)), testfile);

View File

@ -3761,7 +3761,7 @@ dependencies will be used:
with the above limitations in dynamic and static libraries, it is required
for all upstream dependencies to be in the same format. The next question is
whether to prefer a dynamic or a static format. The compiler currently favors
static linking over dynamic linking, but this can be inverted with the `-Z
static linking over dynamic linking, but this can be inverted with the `-C
prefer-dynamic` flag to the compiler.
What this means is that first the compiler will attempt to find all upstream

View File

@ -111,13 +111,13 @@ pub mod write {
fn target_feature<'a>(sess: &'a Session) -> &'a str {
match sess.targ_cfg.os {
abi::OsAndroid => {
if "" == sess.opts.target_feature {
if "" == sess.opts.cg.target_feature {
"+v7"
} else {
sess.opts.target_feature.as_slice()
sess.opts.cg.target_feature.as_slice()
}
}
_ => sess.opts.target_feature.as_slice()
_ => sess.opts.cg.target_feature.as_slice()
}
}
@ -130,7 +130,7 @@ pub mod write {
unsafe {
configure_llvm(sess);
if sess.opts.save_temps {
if sess.opts.cg.save_temps {
output.with_extension("no-opt.bc").with_c_str(|buf| {
llvm::LLVMWriteBitcodeToFile(llmod, buf);
})
@ -142,7 +142,7 @@ pub mod write {
session::Default => lib::llvm::CodeGenLevelDefault,
session::Aggressive => lib::llvm::CodeGenLevelAggressive,
};
let use_softfp = sess.opts.debugging_opts & session::USE_SOFTFP != 0;
let use_softfp = sess.opts.cg.soft_float;
// FIXME: #11906: Omitting frame pointers breaks retrieving the value of a parameter.
// FIXME: #11954: mac64 unwinding may not work with fp elim
@ -151,7 +151,7 @@ pub mod write {
sess.targ_cfg.arch == abi::X86_64);
let tm = sess.targ_cfg.target_strs.target_triple.with_c_str(|T| {
sess.opts.target_cpu.with_c_str(|CPU| {
sess.opts.cg.target_cpu.with_c_str(|CPU| {
target_feature(&sess).with_c_str(|Features| {
llvm::LLVMRustCreateTargetMachine(
T, CPU, Features,
@ -180,13 +180,13 @@ pub mod write {
};
if !sess.no_verify() { assert!(addpass("verify")); }
if !sess.no_prepopulate_passes() {
if !sess.opts.cg.no_prepopulate_passes {
llvm::LLVMRustAddAnalysisPasses(tm, fpm, llmod);
llvm::LLVMRustAddAnalysisPasses(tm, mpm, llmod);
populate_llvm_passes(fpm, mpm, llmod, OptLevel);
}
for pass in sess.opts.custom_passes.iter() {
for pass in sess.opts.cg.passes.iter() {
pass.with_c_str(|s| {
if !llvm::LLVMRustAddPass(mpm, s) {
sess.warn(format!("unknown pass {}, ignoring", *pass));
@ -208,7 +208,7 @@ pub mod write {
// emitting an rlib. Whenever an rlib is created, the bytecode is
// inserted into the archive in order to allow LTO against it.
let crate_types = sess.crate_types.borrow();
if sess.opts.save_temps ||
if sess.opts.cg.save_temps ||
(crate_types.get().contains(&session::CrateTypeRlib) &&
sess.opts.output_types.contains(&OutputTypeExe)) {
output.temp_path(OutputTypeBitcode).with_c_str(|buf| {
@ -220,7 +220,7 @@ pub mod write {
time(sess.time_passes(), "all lto passes", (), |()|
lto::run(sess, llmod, tm, trans.reachable));
if sess.opts.save_temps {
if sess.opts.cg.save_temps {
output.with_extension("lto.bc").with_c_str(|buf| {
llvm::LLVMWriteBitcodeToFile(llmod, buf);
})
@ -353,10 +353,10 @@ pub mod write {
// Copy what clang does by turning on loop vectorization at O2 and
// slp vectorization at O3
let vectorize_loop = !sess.no_vectorize_loops() &&
let vectorize_loop = !sess.opts.cg.no_vectorize_loops &&
(sess.opts.optimize == session::Default ||
sess.opts.optimize == session::Aggressive);
let vectorize_slp = !sess.no_vectorize_slp() &&
let vectorize_slp = !sess.opts.cg.no_vectorize_slp &&
sess.opts.optimize == session::Aggressive;
let mut llvm_c_strs = ~[];
@ -374,7 +374,7 @@ pub mod write {
if sess.time_llvm_passes() { add("-time-passes"); }
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }
for arg in sess.opts.llvm_args.iter() {
for arg in sess.opts.cg.llvm_args.iter() {
add(*arg);
}
@ -745,7 +745,7 @@ pub fn output_lib_filename(lm: &LinkMeta) -> ~str {
}
pub fn get_cc_prog(sess: Session) -> ~str {
match sess.opts.linker {
match sess.opts.cg.linker {
Some(ref linker) => return linker.to_owned(),
None => {}
}
@ -763,7 +763,7 @@ pub fn get_cc_prog(sess: Session) -> ~str {
}
pub fn get_ar_prog(sess: Session) -> ~str {
match sess.opts.ar {
match sess.opts.cg.ar {
Some(ref ar) => return ar.to_owned(),
None => {}
}
@ -773,7 +773,7 @@ pub fn get_ar_prog(sess: Session) -> ~str {
fn get_system_tool(sess: Session, tool: &str) -> ~str {
match sess.targ_cfg.os {
abi::OsAndroid => match sess.opts.android_cross_path {
abi::OsAndroid => match sess.opts.cg.android_cross_path {
Some(ref path) => {
let tool_str = match tool {
"cc" => "gcc",
@ -783,7 +783,7 @@ fn get_system_tool(sess: Session, tool: &str) -> ~str {
}
None => {
sess.fatal(format!("need Android NDK path for the '{}' tool \
(--android-cross-path)", tool))
(-C android-cross-path)", tool))
}
},
_ => tool.to_owned(),
@ -813,7 +813,7 @@ pub fn link_binary(sess: Session,
}
// Remove the temporary object file and metadata if we aren't saving temps
if !sess.opts.save_temps {
if !sess.opts.cg.save_temps {
let obj_filename = outputs.temp_path(OutputTypeObject);
if !sess.opts.output_types.contains(&OutputTypeObject) {
remove(sess, &obj_filename);
@ -969,7 +969,7 @@ fn link_rlib(sess: Session,
// into the archive.
let bc = obj_filename.with_extension("bc");
a.add_file(&bc, false);
if !sess.opts.save_temps &&
if !sess.opts.cg.save_temps &&
!sess.opts.output_types.contains(&OutputTypeBitcode) {
remove(sess, &bc);
}
@ -1142,7 +1142,7 @@ fn link_args(sess: Session,
args.push(~"-dynamiclib");
args.push(~"-Wl,-dylib");
// FIXME (#9639): This needs to handle non-utf8 paths
if !sess.opts.no_rpath {
if !sess.opts.cg.no_rpath {
args.push(~"-Wl,-install_name,@rpath/" +
out_filename.filename_str().unwrap());
}
@ -1163,13 +1163,13 @@ fn link_args(sess: Session,
// FIXME (#2397): At some point we want to rpath our guesses as to
// where extern libraries might live, based on the
// addl_lib_search_paths
if !sess.opts.no_rpath {
if !sess.opts.cg.no_rpath {
args.push_all(rpath::get_rpath_flags(sess, out_filename));
}
// Finally add all the linker arguments provided on the command line along
// with any #[link_args] attributes found inside the crate
args.push_all(sess.opts.linker_args);
args.push_all(sess.opts.cg.link_args);
let used_link_args = sess.cstore.get_used_link_args();
let used_link_args = used_link_args.borrow();
for arg in used_link_args.get().iter() {
@ -1235,7 +1235,7 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
}
let cstore = sess.cstore;
if !dylib && !sess.prefer_dynamic() {
if !dylib && !sess.opts.cg.prefer_dynamic {
// With an executable, things get a little interesting. As a limitation
// of the current implementation, we require that everything must be
// static or everything must be dynamic. The reasons for this are a

View File

@ -19,7 +19,7 @@ use std::libc;
pub fn run(sess: session::Session, llmod: ModuleRef,
tm: TargetMachineRef, reachable: &[~str]) {
if sess.prefer_dynamic() {
if sess.opts.cg.prefer_dynamic {
sess.err("cannot prefer dynamic linking when performing LTO");
sess.note("only 'staticlib' and 'bin' outputs are supported with LTO");
sess.abort_if_errors();

View File

@ -382,7 +382,7 @@ pub fn phase_4_translate_to_llvm(sess: Session,
pub fn phase_5_run_llvm_passes(sess: Session,
trans: &CrateTranslation,
outputs: &OutputFilenames) {
if sess.no_integrated_as() {
if sess.opts.cg.no_integrated_as {
let output_type = link::OutputTypeAssembly;
time(sess.time_passes(), "LLVM passes", (), |_|
@ -391,7 +391,7 @@ pub fn phase_5_run_llvm_passes(sess: Session,
link::write::run_assembler(sess, outputs);
// Remove assembly source, unless --save-temps was specified
if !sess.opts.save_temps {
if !sess.opts.cg.save_temps {
fs::unlink(&outputs.temp_path(link::OutputTypeAssembly)).unwrap();
}
} else {
@ -747,7 +747,6 @@ pub fn build_session_options(binary: ~str,
let parse_only = matches.opt_present("parse-only");
let no_trans = matches.opt_present("no-trans");
let no_analysis = matches.opt_present("no-analysis");
let no_rpath = matches.opt_present("no-rpath");
let lint_levels = [lint::allow, lint::warn,
lint::deny, lint::forbid];
@ -817,9 +816,6 @@ pub fn build_session_options(binary: ~str,
let sysroot_opt = matches.opt_str("sysroot").map(|m| @Path::new(m));
let target = matches.opt_str("target").unwrap_or(host_triple());
let target_cpu = matches.opt_str("target-cpu").unwrap_or(~"generic");
let target_feature = matches.opt_str("target-feature").unwrap_or(~"");
let save_temps = matches.opt_present("save-temps");
let opt_level = {
if (debugging_opts & session::NO_OPT) != 0 {
No
@ -841,85 +837,77 @@ pub fn build_session_options(binary: ~str,
} else { No }
};
let gc = debugging_opts & session::GC != 0;
let extra_debuginfo = debugging_opts & session::EXTRA_DEBUG_INFO != 0;
let debuginfo = debugging_opts & session::DEBUG_INFO != 0 ||
extra_debuginfo;
let debuginfo = matches.opt_present("g") || matches.opt_present("debuginfo");
let addl_lib_search_paths = matches.opt_strs("L").map(|s| {
Path::new(s.as_slice())
}).move_iter().collect();
let ar = matches.opt_str("ar");
let linker = matches.opt_str("linker");
let linker_args = matches.opt_strs("link-args").flat_map( |a| {
a.split(' ').filter_map(|arg| {
if arg.is_empty() {
None
} else {
Some(arg.to_owned())
}
}).collect()
});
let cfg = parse_cfgspecs(matches.opt_strs("cfg"));
let test = matches.opt_present("test");
let android_cross_path = matches.opt_str("android-cross-path");
let write_dependency_info = (matches.opt_present("dep-info"),
matches.opt_str("dep-info").map(|p| Path::new(p)));
let custom_passes = match matches.opt_str("passes") {
None => ~[],
Some(s) => {
s.split(|c: char| c == ' ' || c == ',').map(|s| {
s.trim().to_owned()
}).collect()
}
};
let llvm_args = match matches.opt_str("llvm-args") {
None => ~[],
Some(s) => {
s.split(|c: char| c == ' ' || c == ',').map(|s| {
s.trim().to_owned()
}).collect()
}
};
let print_metas = (matches.opt_present("crate-id"),
matches.opt_present("crate-name"),
matches.opt_present("crate-file-name"));
let cg = build_codegen_options(matches);
let sopts = @session::Options {
crate_types: crate_types,
gc: gc,
optimize: opt_level,
custom_passes: custom_passes,
llvm_args: llvm_args,
debuginfo: debuginfo,
extra_debuginfo: extra_debuginfo,
lint_opts: lint_opts,
save_temps: save_temps,
output_types: output_types,
addl_lib_search_paths: @RefCell::new(addl_lib_search_paths),
ar: ar,
linker: linker,
linker_args: linker_args,
maybe_sysroot: sysroot_opt,
target_triple: target,
target_cpu: target_cpu,
target_feature: target_feature,
cfg: cfg,
binary: binary,
test: test,
parse_only: parse_only,
no_trans: no_trans,
no_analysis: no_analysis,
no_rpath: no_rpath,
debugging_opts: debugging_opts,
android_cross_path: android_cross_path,
write_dependency_info: write_dependency_info,
print_metas: print_metas,
cg: cg,
};
return sopts;
}
pub fn build_codegen_options(matches: &getopts::Matches)
-> session::CodegenOptions
{
let mut cg = session::basic_codegen_options();
for option in matches.opt_strs("C").move_iter() {
let mut iter = option.splitn('=', 1);
let key = iter.next().unwrap();
let value = iter.next();
let option_to_lookup = key.replace("-", "_");
let mut found = false;
for &(candidate, setter, _) in session::CG_OPTIONS.iter() {
if option_to_lookup.as_slice() != candidate { continue }
if !setter(&mut cg, value) {
match value {
Some(..) => early_error(format!("codegen option `{}` takes \
no value", key)),
None => early_error(format!("codegen option `{0}` requires \
a value (-C {0}=<value>)",
key))
}
}
found = true;
break;
}
if !found {
early_error(format!("unknown codegen option: `{}`", key));
}
}
return cg;
}
pub fn build_session(sopts: @session::Options,
local_crate_source_file: Option<Path>)
-> Session {
@ -1002,15 +990,12 @@ pub fn optgroups() -> ~[getopts::OptGroup] {
optmulti("", "emit", "Comma separated list of types of output for the compiler
to emit",
"[asm|bc|ir|obj|link]"),
optopt("", "linker", "Program to use for linking instead of the default.", "LINKER"),
optopt("", "ar", "Program to use for managing archives instead of the default.", "AR"),
optflag("", "crate-id", "Output the crate id and exit"),
optflag("", "crate-name", "Output the crate name and exit"),
optflag("", "crate-file-name", "Output the file(s) that would be written if compilation \
continued and exit"),
optmulti("", "link-args", "FLAGS is a space-separated list of flags
passed to the linker", "FLAGS"),
optflag("", "ls", "List the symbols defined by a library crate"),
optflag("g", "debuginfo", "Emit DWARF debug info to the objects created"),
optflag("", "no-trans",
"Run all passes except translation; no output"),
optflag("", "no-analysis",
@ -1020,13 +1005,6 @@ pub fn optgroups() -> ~[getopts::OptGroup] {
optopt("o", "", "Write output to <filename>", "FILENAME"),
optopt("", "opt-level",
"Optimize with possible levels 0-3", "LEVEL"),
optopt("", "passes", "Comma or space separated list of pass names to use. \
Appends to the default list of passes to run for the \
specified current optimization level. A value of \
\"list\" will list all of the available passes", "NAMES"),
optopt("", "llvm-args", "A list of arguments to pass to llvm, comma \
separated", "ARGS"),
optflag("", "no-rpath", "Disables setting the rpath in libs/exes"),
optopt( "", "out-dir",
"Write output to compiler-chosen filename
in <dir>", "DIR"),
@ -1041,9 +1019,6 @@ pub fn optgroups() -> ~[getopts::OptGroup] {
AST nodes and blocks with IDs)", "TYPE"),
optflagopt("", "dep-info",
"Output dependency info to <filename> after compiling", "FILENAME"),
optflag("", "save-temps",
"Write intermediate files (.bc, .opt.bc, .o)
in addition to normal output"),
optopt("", "sysroot",
"Override the system root", "PATH"),
optflag("", "test", "Build a test harness"),
@ -1051,14 +1026,6 @@ pub fn optgroups() -> ~[getopts::OptGroup] {
"Target triple cpu-manufacturer-kernel[-os]
to compile for (see chapter 3.4 of http://www.sourceware.org/autobook/
for details)", "TRIPLE"),
optopt("", "target-cpu",
"Select target processor (llc -mcpu=help
for details)", "CPU"),
optopt("", "target-feature",
"Target specific attributes (llc -mattr=help
for details)", "FEATURE"),
optopt("", "android-cross-path",
"The path to the Android NDK", "PATH"),
optmulti("W", "warn",
"Set lint warnings", "OPT"),
optmulti("A", "allow",
@ -1067,6 +1034,8 @@ pub fn optgroups() -> ~[getopts::OptGroup] {
"Set lint denied", "OPT"),
optmulti("F", "forbid",
"Set lint forbidden", "OPT"),
optmulti("C", "codegen",
"Set a codegen option", "OPT[=VALUE]"),
optmulti("Z", "", "Set internal debugging options", "FLAG"),
optflag( "v", "version",
"Print version info and exit"),

View File

@ -65,17 +65,8 @@ debugging_opts!(
META_STATS,
NO_OPT,
GC,
DEBUG_INFO,
EXTRA_DEBUG_INFO,
PRINT_LINK_ARGS,
PRINT_LLVM_PASSES,
NO_VECTORIZE_LOOPS,
NO_VECTORIZE_SLP,
NO_PREPOPULATE_PASSES,
USE_SOFTFP,
GEN_CRATE_MAP,
PREFER_DYNAMIC,
NO_INTEGRATED_AS,
LTO
]
0
@ -104,26 +95,9 @@ pub fn debugging_opts_map() -> ~[(&'static str, &'static str, u64)] {
("print-link-args", "Print the arguments passed to the linker",
PRINT_LINK_ARGS),
("gc", "Garbage collect shared data (experimental)", GC),
("extra-debug-info", "Extra debugging info (experimental)",
EXTRA_DEBUG_INFO),
("debug-info", "Produce debug info (experimental)", DEBUG_INFO),
("print-llvm-passes",
"Prints the llvm optimization passes being run",
PRINT_LLVM_PASSES),
("no-prepopulate-passes",
"Don't pre-populate the pass managers with a list of passes, only use \
the passes from --passes",
NO_PREPOPULATE_PASSES),
("no-vectorize-loops",
"Don't run the loop vectorization optimization passes",
NO_VECTORIZE_LOOPS),
("no-vectorize-slp", "Don't run LLVM's SLP vectorization passes",
NO_VECTORIZE_SLP),
("soft-float", "Generate software floating point library calls", USE_SOFTFP),
("gen-crate-map", "Force generation of a toplevel crate map", GEN_CRATE_MAP),
("prefer-dynamic", "Prefer dynamic linking to static linking", PREFER_DYNAMIC),
("no-integrated-as",
"Use external assembler rather than LLVM's integrated one", NO_INTEGRATED_AS),
("lto", "Perform LLVM link-time optimizations", LTO),
]
}
@ -144,24 +118,15 @@ pub struct Options {
gc: bool,
optimize: OptLevel,
custom_passes: ~[~str],
llvm_args: ~[~str],
debuginfo: bool,
extra_debuginfo: bool,
lint_opts: ~[(lint::Lint, lint::level)],
save_temps: bool,
output_types: ~[back::link::OutputType],
// This was mutable for rustpkg, which updates search paths based on the
// parsed code. It remains mutable in case its replacements wants to use
// this.
addl_lib_search_paths: @RefCell<HashSet<Path>>,
ar: Option<~str>,
linker: Option<~str>,
linker_args: ~[~str],
maybe_sysroot: Option<@Path>,
target_triple: ~str,
target_cpu: ~str,
target_feature: ~str,
// User-specified cfg meta items. The compiler itself will add additional
// items to the crate config, and during parsing the entire crate config
// will be added to the crate AST node. This should not be used for
@ -172,13 +137,12 @@ pub struct Options {
parse_only: bool,
no_trans: bool,
no_analysis: bool,
no_rpath: bool,
debugging_opts: u64,
android_cross_path: Option<~str>,
/// Whether to write dependency files. It's (enabled, optional filename).
write_dependency_info: (bool, Option<Path>),
/// Crate id-related things to maybe print. It's (crate_id, crate_name, crate_file_name).
print_metas: (bool, bool, bool),
cg: CodegenOptions,
}
// The type of entry function, so
@ -329,24 +293,6 @@ impl Session_ {
pub fn print_llvm_passes(&self) -> bool {
self.debugging_opt(PRINT_LLVM_PASSES)
}
pub fn no_prepopulate_passes(&self) -> bool {
self.debugging_opt(NO_PREPOPULATE_PASSES)
}
pub fn no_vectorize_loops(&self) -> bool {
self.debugging_opt(NO_VECTORIZE_LOOPS)
}
pub fn no_vectorize_slp(&self) -> bool {
self.debugging_opt(NO_VECTORIZE_SLP)
}
pub fn gen_crate_map(&self) -> bool {
self.debugging_opt(GEN_CRATE_MAP)
}
pub fn prefer_dynamic(&self) -> bool {
self.debugging_opt(PREFER_DYNAMIC)
}
pub fn no_integrated_as(&self) -> bool {
self.debugging_opt(NO_INTEGRATED_AS)
}
pub fn lto(&self) -> bool {
self.debugging_opt(LTO)
}
@ -381,35 +327,132 @@ pub fn basic_options() -> @Options {
crate_types: ~[],
gc: false,
optimize: No,
custom_passes: ~[],
llvm_args: ~[],
debuginfo: false,
extra_debuginfo: false,
lint_opts: ~[],
save_temps: false,
output_types: ~[],
addl_lib_search_paths: @RefCell::new(HashSet::new()),
ar: None,
linker: None,
linker_args: ~[],
maybe_sysroot: None,
target_triple: host_triple(),
target_cpu: ~"generic",
target_feature: ~"",
cfg: ~[],
binary: ~"rustc",
test: false,
parse_only: false,
no_trans: false,
no_analysis: false,
no_rpath: false,
debugging_opts: 0,
android_cross_path: None,
write_dependency_info: (false, None),
print_metas: (false, false, false),
cg: basic_codegen_options(),
}
}
/// Declare a macro that will define all CodegenOptions fields and parsers all
/// at once. The goal of this macro is to define an interface that can be
/// programmatically used by the option parser in order to initialize the struct
/// without hardcoding field names all over the place.
///
/// The goal is to invoke this macro once with the correct fields, and then this
/// macro generates all necessary code. The main gotcha of this macro is the
/// cgsetters module which is a bunch of generated code to parse an option into
/// its respective field in the struct. There are a few hand-written parsers for
/// parsing specific types of values in this module.
macro_rules! cgoptions(
($($opt:ident : $t:ty = ($init:expr, $parse:ident, $desc:expr)),* ,) =>
(
#[deriving(Clone)]
pub struct CodegenOptions { $($opt: $t),* }
pub fn basic_codegen_options() -> CodegenOptions {
CodegenOptions { $($opt: $init),* }
}
pub type CodegenSetter = fn(&mut CodegenOptions, v: Option<&str>) -> bool;
pub static CG_OPTIONS: &'static [(&'static str, CodegenSetter,
&'static str)] =
&[ $( (stringify!($opt), cgsetters::$opt, $desc) ),* ];
mod cgsetters {
use super::CodegenOptions;
$(
pub fn $opt(cg: &mut CodegenOptions, v: Option<&str>) -> bool {
$parse(&mut cg.$opt, v)
}
)*
fn parse_bool(slot: &mut bool, v: Option<&str>) -> bool {
match v {
Some(..) => false,
None => { *slot = true; true }
}
}
fn parse_opt_string(slot: &mut Option<~str>, v: Option<&str>) -> bool {
match v {
Some(s) => { *slot = Some(s.to_owned()); true },
None => false,
}
}
fn parse_string(slot: &mut ~str, v: Option<&str>) -> bool {
match v {
Some(s) => { *slot = s.to_owned(); true },
None => false,
}
}
fn parse_list(slot: &mut ~[~str], v: Option<&str>) -> bool {
match v {
Some(s) => {
for s in s.words() {
slot.push(s.to_owned());
}
true
},
None => false,
}
}
}
) )
cgoptions!(
ar: Option<~str> = (None, parse_opt_string,
"tool to assemble archives with"),
linker: Option<~str> = (None, parse_opt_string,
"system linker to link outputs with"),
link_args: ~[~str] = (~[], parse_list,
"extra arguments to pass to the linker (space separated)"),
target_cpu: ~str = (~"generic", parse_string,
"select target processor (llc -mcpu=help for details)"),
target_feature: ~str = (~"", parse_string,
"target specific attributes (llc -mattr=help for details)"),
passes: ~[~str] = (~[], parse_list,
"a list of extra LLVM passes to run (space separated)"),
llvm_args: ~[~str] = (~[], parse_list,
"a list of arguments to pass to llvm (space separated)"),
save_temps: bool = (false, parse_bool,
"save all temporary output files during compilation"),
android_cross_path: Option<~str> = (None, parse_opt_string,
"the path to the Android NDK"),
no_rpath: bool = (false, parse_bool,
"disables setting the rpath in libs/exes"),
no_prepopulate_passes: bool = (false, parse_bool,
"don't pre-populate the pass manager with a list of passes"),
no_vectorize_loops: bool = (false, parse_bool,
"don't run the loop vectorization optimization passes"),
no_vectorize_slp: bool = (false, parse_bool,
"don't run LLVM's SLP vectorization pass"),
soft_float: bool = (false, parse_bool,
"generate software floating point library calls"),
gen_crate_map: bool = (false, parse_bool,
"force generation of a toplevel crate map"),
prefer_dynamic: bool = (false, parse_bool,
"prefer dynamic linking to static linking"),
no_integrated_as: bool = (false, parse_bool,
"use an external assembler rather than LLVM's integrated one"),
)
// Seems out of place, but it uses session, so I'm putting it here
pub fn expect<T:Clone>(sess: Session, opt: Option<T>, msg: || -> ~str) -> T {
diagnostic::expect(sess.diagnostic(), opt, msg)

View File

@ -168,7 +168,7 @@ Available lint options:
fn padded(max: uint, s: &str) -> ~str {
" ".repeat(max - s.len()) + s
}
println!("{}", "\nAvailable lint checks:\n"); // FIXME: #9970
println!("\nAvailable lint checks:\n");
println!(" {} {:7.7s} {}",
padded(max_key, "name"), "default", "meaning");
println!(" {} {:7.7s} {}\n",
@ -184,7 +184,7 @@ Available lint options:
}
pub fn describe_debug_flags() {
println!("{}", "\nAvailable debug options:\n"); // FIXME: #9970
println!("\nAvailable debug options:\n");
let r = session::debugging_opts_map();
for tuple in r.iter() {
match *tuple {
@ -195,6 +195,22 @@ pub fn describe_debug_flags() {
}
}
pub fn describe_codegen_flags() {
println!("\nAvailable codegen options:\n");
let mut cg = session::basic_codegen_options();
for &(name, parser, desc) in session::CG_OPTIONS.iter() {
// we invoke the parser function on `None` to see if this option needs
// an argument or not.
let (width, extra) = if parser(&mut cg, None) {
(25, "")
} else {
(21, "=val")
};
println!(" -C {:>width$s}{} -- {}", name.replace("_", "-"),
extra, desc, width=width);
}
}
pub fn run_compiler(args: &[~str]) {
let mut args = args.to_owned();
let binary = args.shift().unwrap();
@ -227,7 +243,13 @@ pub fn run_compiler(args: &[~str]) {
return;
}
if matches.opt_str("passes") == Some(~"list") {
let cg_flags = matches.opt_strs("C");
if cg_flags.iter().any(|x| x == &~"help") {
describe_codegen_flags();
return;
}
if cg_flags.contains(&~"passes=list") {
unsafe { lib::llvm::llvm::LLVMRustPrintPasses(); }
return;
}

View File

@ -1371,7 +1371,7 @@ fn insert_lllocals<'a>(bcx: &'a Block<'a>,
llmap.get().insert(binding_info.id, datum);
}
if bcx.sess().opts.extra_debuginfo {
if bcx.sess().opts.debuginfo {
debuginfo::create_match_binding_metadata(bcx,
ident,
binding_info.id,
@ -2030,7 +2030,7 @@ pub fn store_arg<'a>(mut bcx: &'a Block<'a>,
// like `x: T`
let arg_ty = node_id_type(bcx, pat.id);
if type_of::arg_is_indirect(bcx.ccx(), arg_ty)
&& !bcx.ccx().sess.opts.extra_debuginfo {
&& !bcx.ccx().sess.opts.debuginfo {
// Don't copy an indirect argument to an alloca, the caller
// already put it in a temporary alloca and gave it up, unless
// we emit extra-debug-info, which requires local allocas :(.

View File

@ -568,7 +568,7 @@ pub fn get_res_dtor(ccx: @CrateContext,
// Structural comparison: a rather involved form of glue.
pub fn maybe_name_value(cx: &CrateContext, v: ValueRef, s: &str) {
if cx.sess.opts.save_temps {
if cx.sess.opts.cg.save_temps {
s.with_c_str(|buf| {
unsafe {
llvm::LLVMSetValueName(v, buf)
@ -1389,7 +1389,7 @@ fn copy_args_to_allocas<'a>(fcx: &FunctionContext<'a>,
bcx = _match::store_arg(bcx, args[i].pat, arg_datum, arg_scope_id);
if fcx.ccx.sess.opts.extra_debuginfo {
if fcx.ccx.sess.opts.debuginfo {
debuginfo::create_argument_metadata(bcx, &args[i]);
}
}
@ -2510,7 +2510,7 @@ pub fn decl_crate_map(sess: session::Session, mapmeta: LinkMeta,
let mut n_subcrates = 1;
let cstore = sess.cstore;
while cstore.have_crate_data(n_subcrates) { n_subcrates += 1; }
let is_top = !sess.building_library.get() || sess.gen_crate_map();
let is_top = !sess.building_library.get() || sess.opts.cg.gen_crate_map;
let sym_name = if is_top {
~"_rust_crate_map_toplevel"
} else {

View File

@ -298,7 +298,7 @@ fn load_environment<'a>(bcx: &'a Block<'a>, cdata_ty: ty::t,
// Store the pointer to closure data in an alloca for debug info because that's what the
// llvm.dbg.declare intrinsic expects
let env_pointer_alloca = if bcx.ccx().sess.opts.extra_debuginfo {
let env_pointer_alloca = if bcx.ccx().sess.opts.debuginfo {
let alloc = alloc_ty(bcx, ty::mk_mut_ptr(bcx.tcx(), cdata_ty), "__debuginfo_env_ptr");
Store(bcx, llcdata, alloc);
Some(alloc)

View File

@ -151,7 +151,7 @@ impl CrateContext {
let tn = TypeNames::new();
let mut intrinsics = base::declare_intrinsics(llmod);
if sess.opts.extra_debuginfo {
if sess.opts.debuginfo {
base::declare_dbg_intrinsics(llmod, &mut intrinsics);
}
let int_type = Type::int(targ_cfg.arch);

View File

@ -56,7 +56,7 @@ pub fn trans_stmt<'a>(cx: &'a Block<'a>,
match d.node {
ast::DeclLocal(ref local) => {
bcx = init_local(bcx, *local);
if cx.sess().opts.extra_debuginfo {
if cx.sess().opts.debuginfo {
debuginfo::create_local_var_metadata(bcx, *local);
}
}

View File

@ -707,7 +707,7 @@ pub fn create_function_debug_context(cx: &CrateContext,
fn_decl: &ast::FnDecl,
param_substs: Option<@param_substs>,
error_span: Span) -> DIArray {
if !cx.sess.opts.extra_debuginfo {
if !cx.sess.opts.debuginfo {
return create_DIArray(DIB(cx), []);
}
@ -784,8 +784,8 @@ pub fn create_function_debug_context(cx: &CrateContext,
name_to_append_suffix_to.push_str(",");
}
// Only create type information if extra_debuginfo is enabled
if cx.sess.opts.extra_debuginfo {
// Only create type information if debuginfo is enabled
if cx.sess.opts.debuginfo {
let actual_self_type_metadata = type_metadata(cx,
actual_self_type,
codemap::DUMMY_SP);
@ -829,8 +829,8 @@ pub fn create_function_debug_context(cx: &CrateContext,
name_to_append_suffix_to.push_str(",");
}
// Again, only create type information if extra_debuginfo is enabled
if cx.sess.opts.extra_debuginfo {
// Again, only create type information if debuginfo is enabled
if cx.sess.opts.debuginfo {
let actual_type_metadata = type_metadata(cx, actual_type, codemap::DUMMY_SP);
let param_metadata_string = token::get_ident(ident.name);
let param_metadata = param_metadata_string.get()

View File

@ -105,8 +105,11 @@ fn runtest(test: &str, cratename: &str, libs: HashSet<Path>) {
maybe_sysroot: Some(@os::self_exe_path().unwrap().dir_path()),
addl_lib_search_paths: @RefCell::new(libs),
crate_types: ~[session::CrateTypeExecutable],
debugging_opts: session::PREFER_DYNAMIC,
output_types: ~[link::OutputTypeExe],
cg: session::CodegenOptions {
prefer_dynamic: true,
.. session::basic_codegen_options()
},
.. (*session::basic_options()).clone()
};

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --linker=llllll
// compile-flags: -C linker=llllll
// error-pattern: the linker `llllll`
fn main() {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: -Z lto -Z prefer-dynamic
// compile-flags: -Z lto -C prefer-dynamic
// error-pattern: cannot prefer dynamic linking

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -16,7 +16,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -13,7 +13,7 @@
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
// its numerical value.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -15,7 +15,7 @@
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
// its numerical value.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -13,7 +13,7 @@
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
// its numerical value.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -17,7 +17,7 @@
// before the arguments have been properly loaded when setting the breakpoint via the function name.
// Therefore the setup here sets them using line numbers (so be careful when changing this file).
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:break function-arg-initialization.rs:139
// debugger:break function-arg-initialization.rs:154

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -16,7 +16,7 @@
// consequence, and as opposed to regular Rust functions, we can set the breakpoints via the
// function name (and don't have to fall back on using line numbers).
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak immediate_args
// debugger:rbreak binding

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -19,7 +19,7 @@ fn main() {
// This test case checks whether compile unit names are set correctly, so that the correct default
// source file can be found.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:list
// check:1[...]fn main() {
// check:2[...]let args : ~[~str] = ::std::os::args();

View File

@ -11,7 +11,7 @@
// xfail-win32
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-win32
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-win32
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z debug-info
// compile-flags:-g
// debugger:run
// Nothing to do here really, just make sure it compiles. See issue #8513.

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-win32
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:run
// Test whether compiling a recursive enum definition crashes debug info generation. The test case

View File

@ -12,7 +12,7 @@
#[feature(managed_boxes)];
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -10,7 +10,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:run
#[allow(unused_variable)];

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print pretty off
// debugger:rbreak zzz
// debugger:run

View File

@ -11,7 +11,7 @@
// xfail-tidy-linelength
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:set print union on
// debugger:rbreak zzz
// debugger:run

View File

@ -10,7 +10,7 @@
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

View File

@ -11,7 +11,7 @@
// xfail-win32: FIXME #10474
// xfail-android: FIXME(#10381)
// compile-flags:-Z extra-debug-info
// compile-flags:-g
// debugger:rbreak zzz
// debugger:run
// debugger:finish

Some files were not shown because too many files have changed in this diff Show More