mirror of
https://github.com/rust-lang/cargo
synced 2024-08-25 02:25:46 +00:00
Allow debuginfo level to be specified
`true` is mapped to `2`, which matches current behavior.
This commit is contained in:
parent
6291619896
commit
6d864a81cb
|
@ -130,7 +130,7 @@ pub struct Profile {
|
||||||
pub codegen_units: Option<u32>, // None = use rustc default
|
pub codegen_units: Option<u32>, // None = use rustc default
|
||||||
pub rustc_args: Option<Vec<String>>,
|
pub rustc_args: Option<Vec<String>>,
|
||||||
pub rustdoc_args: Option<Vec<String>>,
|
pub rustdoc_args: Option<Vec<String>>,
|
||||||
pub debuginfo: bool,
|
pub debuginfo: Option<u32>,
|
||||||
pub debug_assertions: bool,
|
pub debug_assertions: bool,
|
||||||
pub rpath: bool,
|
pub rpath: bool,
|
||||||
pub test: bool,
|
pub test: bool,
|
||||||
|
@ -143,7 +143,7 @@ pub struct Profile {
|
||||||
#[derive(RustcEncodable)]
|
#[derive(RustcEncodable)]
|
||||||
struct SerializedProfile<'a> {
|
struct SerializedProfile<'a> {
|
||||||
opt_level: &'a str,
|
opt_level: &'a str,
|
||||||
debuginfo: bool,
|
debuginfo: Option<u32>,
|
||||||
debug_assertions: bool,
|
debug_assertions: bool,
|
||||||
test: bool,
|
test: bool,
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,7 @@ impl fmt::Display for Target {
|
||||||
impl Profile {
|
impl Profile {
|
||||||
pub fn default_dev() -> Profile {
|
pub fn default_dev() -> Profile {
|
||||||
Profile {
|
Profile {
|
||||||
debuginfo: true,
|
debuginfo: Some(2),
|
||||||
debug_assertions: true,
|
debug_assertions: true,
|
||||||
..Profile::default()
|
..Profile::default()
|
||||||
}
|
}
|
||||||
|
@ -497,7 +497,7 @@ impl Profile {
|
||||||
pub fn default_release() -> Profile {
|
pub fn default_release() -> Profile {
|
||||||
Profile {
|
Profile {
|
||||||
opt_level: "3".to_string(),
|
opt_level: "3".to_string(),
|
||||||
debuginfo: false,
|
debuginfo: None,
|
||||||
..Profile::default()
|
..Profile::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,7 +554,7 @@ impl Default for Profile {
|
||||||
codegen_units: None,
|
codegen_units: None,
|
||||||
rustc_args: None,
|
rustc_args: None,
|
||||||
rustdoc_args: None,
|
rustdoc_args: None,
|
||||||
debuginfo: false,
|
debuginfo: None,
|
||||||
debug_assertions: false,
|
debug_assertions: false,
|
||||||
rpath: false,
|
rpath: false,
|
||||||
test: false,
|
test: false,
|
||||||
|
|
|
@ -107,7 +107,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>)
|
||||||
Kind::Host => cx.host_triple(),
|
Kind::Host => cx.host_triple(),
|
||||||
Kind::Target => cx.target_triple(),
|
Kind::Target => cx.target_triple(),
|
||||||
})
|
})
|
||||||
.env("DEBUG", &profile.debuginfo.to_string())
|
.env("DEBUG", &profile.debuginfo.is_some().to_string())
|
||||||
.env("OPT_LEVEL", &profile.opt_level)
|
.env("OPT_LEVEL", &profile.opt_level)
|
||||||
.env("PROFILE", if cx.build_config.release { "release" } else { "debug" })
|
.env("PROFILE", if cx.build_config.release { "release" } else { "debug" })
|
||||||
.env("HOST", cx.host_triple())
|
.env("HOST", cx.host_triple())
|
||||||
|
|
|
@ -201,7 +201,7 @@ impl<'a> JobQueue<'a> {
|
||||||
let profile = cx.lib_profile();
|
let profile = cx.lib_profile();
|
||||||
let mut opt_type = String::from(if profile.opt_level == "0" { "unoptimized" }
|
let mut opt_type = String::from(if profile.opt_level == "0" { "unoptimized" }
|
||||||
else { "optimized" });
|
else { "optimized" });
|
||||||
if profile.debuginfo {
|
if profile.debuginfo.is_some() {
|
||||||
opt_type = opt_type + " + debuginfo";
|
opt_type = opt_type + " + debuginfo";
|
||||||
}
|
}
|
||||||
let duration = start_time.elapsed();
|
let duration = start_time.elapsed();
|
||||||
|
|
|
@ -94,7 +94,7 @@ pub fn compile_targets<'a, 'cfg: 'a>(ws: &Workspace<'cfg>,
|
||||||
resolve: &'a Resolve,
|
resolve: &'a Resolve,
|
||||||
config: &'cfg Config,
|
config: &'cfg Config,
|
||||||
build_config: BuildConfig,
|
build_config: BuildConfig,
|
||||||
profiles: &'a Profiles,
|
profiles: &'a Profiles,
|
||||||
exec: Arc<Executor>)
|
exec: Arc<Executor>)
|
||||||
-> CargoResult<Compilation<'cfg>> {
|
-> CargoResult<Compilation<'cfg>> {
|
||||||
let units = pkg_targets.iter().flat_map(|&(pkg, ref targets)| {
|
let units = pkg_targets.iter().flat_map(|&(pkg, ref targets)| {
|
||||||
|
@ -659,8 +659,8 @@ fn build_base_args(cx: &mut Context,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if debuginfo {
|
if let Some(debuginfo) = debuginfo {
|
||||||
cmd.arg("-g");
|
cmd.arg("-C").arg(format!("debuginfo={}", debuginfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref args) = *rustc_args {
|
if let Some(ref args) = *rustc_args {
|
||||||
|
|
|
@ -276,12 +276,18 @@ impl Decodable for TomlOptLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(RustcDecodable, Clone)]
|
||||||
|
pub enum U32OrBool {
|
||||||
|
U32(u32),
|
||||||
|
Bool(bool),
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(RustcDecodable, Clone, Default)]
|
#[derive(RustcDecodable, Clone, Default)]
|
||||||
pub struct TomlProfile {
|
pub struct TomlProfile {
|
||||||
opt_level: Option<TomlOptLevel>,
|
opt_level: Option<TomlOptLevel>,
|
||||||
lto: Option<bool>,
|
lto: Option<bool>,
|
||||||
codegen_units: Option<u32>,
|
codegen_units: Option<u32>,
|
||||||
debug: Option<bool>,
|
debug: Option<U32OrBool>,
|
||||||
debug_assertions: Option<bool>,
|
debug_assertions: Option<bool>,
|
||||||
rpath: Option<bool>,
|
rpath: Option<bool>,
|
||||||
panic: Option<String>,
|
panic: Option<String>,
|
||||||
|
@ -1265,12 +1271,18 @@ fn build_profiles(profiles: &Option<TomlProfiles>) -> Profiles {
|
||||||
|
|
||||||
fn merge(profile: Profile, toml: Option<&TomlProfile>) -> Profile {
|
fn merge(profile: Profile, toml: Option<&TomlProfile>) -> Profile {
|
||||||
let &TomlProfile {
|
let &TomlProfile {
|
||||||
ref opt_level, lto, codegen_units, debug, debug_assertions, rpath,
|
ref opt_level, lto, codegen_units, ref debug, debug_assertions, rpath,
|
||||||
ref panic
|
ref panic
|
||||||
} = match toml {
|
} = match toml {
|
||||||
Some(toml) => toml,
|
Some(toml) => toml,
|
||||||
None => return profile,
|
None => return profile,
|
||||||
};
|
};
|
||||||
|
let debug = match *debug {
|
||||||
|
Some(U32OrBool::U32(debug)) => Some(Some(debug)),
|
||||||
|
Some(U32OrBool::Bool(true)) => Some(Some(2)),
|
||||||
|
Some(U32OrBool::Bool(false)) => Some(None),
|
||||||
|
None => None,
|
||||||
|
};
|
||||||
Profile {
|
Profile {
|
||||||
opt_level: opt_level.clone().unwrap_or(TomlOptLevel(profile.opt_level)).0,
|
opt_level: opt_level.clone().unwrap_or(TomlOptLevel(profile.opt_level)).0,
|
||||||
lto: lto.unwrap_or(profile.lto),
|
lto: lto.unwrap_or(profile.lto),
|
||||||
|
|
|
@ -181,7 +181,8 @@ along with the defaults for each profile.
|
||||||
# The development profile, used for `cargo build`.
|
# The development profile, used for `cargo build`.
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
opt-level = 0 # controls the `--opt-level` the compiler builds with
|
opt-level = 0 # controls the `--opt-level` the compiler builds with
|
||||||
debug = true # controls whether the compiler passes `-g`
|
debug = true # controls whether the compiler passes `-C debuginfo`
|
||||||
|
# a value of `true` is equivalent to `2`
|
||||||
rpath = false # controls whether the compiler passes `-C rpath`
|
rpath = false # controls whether the compiler passes `-C rpath`
|
||||||
lto = false # controls `-C lto` for binaries and staticlibs
|
lto = false # controls `-C lto` for binaries and staticlibs
|
||||||
debug-assertions = true # controls whether debug assertions are enabled
|
debug-assertions = true # controls whether debug assertions are enabled
|
||||||
|
@ -202,7 +203,7 @@ panic = 'unwind'
|
||||||
# The testing profile, used for `cargo test`.
|
# The testing profile, used for `cargo test`.
|
||||||
[profile.test]
|
[profile.test]
|
||||||
opt-level = 0
|
opt-level = 0
|
||||||
debug = true
|
debug = 2
|
||||||
rpath = false
|
rpath = false
|
||||||
lto = false
|
lto = false
|
||||||
debug-assertions = true
|
debug-assertions = true
|
||||||
|
@ -222,7 +223,7 @@ panic = 'unwind'
|
||||||
# The documentation profile, used for `cargo doc`.
|
# The documentation profile, used for `cargo doc`.
|
||||||
[profile.doc]
|
[profile.doc]
|
||||||
opt-level = 0
|
opt-level = 0
|
||||||
debug = true
|
debug = 2
|
||||||
rpath = false
|
rpath = false
|
||||||
lto = false
|
lto = false
|
||||||
debug-assertions = true
|
debug-assertions = true
|
||||||
|
|
|
@ -8,7 +8,7 @@ fn verbose_output_for_lib(p: &ProjectBuilder) -> String {
|
||||||
format!("\
|
format!("\
|
||||||
[COMPILING] {name} v{version} ({url})
|
[COMPILING] {name} v{version} ({url})
|
||||||
[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
|
|
|
@ -184,7 +184,7 @@ fn custom_build_script_rustc_flags() {
|
||||||
execs().with_status(101)
|
execs().with_status(101)
|
||||||
.with_stderr(&format!("\
|
.with_stderr(&format!("\
|
||||||
[COMPILING] bar v0.5.0 ({url})
|
[COMPILING] bar v0.5.0 ({url})
|
||||||
[RUNNING] `rustc --crate-name test {dir}{sep}src{sep}lib.rs --crate-type lib -g \
|
[RUNNING] `rustc --crate-name test {dir}{sep}src{sep}lib.rs --crate-type lib -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
-C extra-filename=-[..] \
|
-C extra-filename=-[..] \
|
||||||
--out-dir {dir}{sep}target \
|
--out-dir {dir}{sep}target \
|
||||||
|
@ -766,19 +766,19 @@ fn build_cmd_with_a_build_cmd() {
|
||||||
[RUNNING] `rustc [..] a[/]build.rs [..] --extern b=[..]`
|
[RUNNING] `rustc [..] a[/]build.rs [..] --extern b=[..]`
|
||||||
[RUNNING] `[..][/]a-[..][/]build-script-build`
|
[RUNNING] `[..][/]a-[..][/]build-script-build`
|
||||||
[RUNNING] `rustc --crate-name a [..]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name a [..]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..]target[/]debug[/]deps \
|
--out-dir [..]target[/]debug[/]deps \
|
||||||
-L [..]target[/]debug[/]deps`
|
-L [..]target[/]debug[/]deps`
|
||||||
[COMPILING] foo v0.5.0 (file://[..])
|
[COMPILING] foo v0.5.0 (file://[..])
|
||||||
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin \
|
[RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-g -C metadata=[..] --out-dir [..] \
|
-C debuginfo=2 -C metadata=[..] --out-dir [..] \
|
||||||
-L [..]target[/]debug[/]deps \
|
-L [..]target[/]debug[/]deps \
|
||||||
--extern a=[..]liba[..].rlib`
|
--extern a=[..]liba[..].rlib`
|
||||||
[RUNNING] `[..][/]foo-[..][/]build-script-build`
|
[RUNNING] `[..][/]foo-[..][/]build-script-build`
|
||||||
[RUNNING] `rustc --crate-name foo [..]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name foo [..]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L [..]target[/]debug[/]deps`
|
-L [..]target[/]debug[/]deps`
|
||||||
|
|
|
@ -821,13 +821,13 @@ fn cargo_default_env_metadata_env_var() {
|
||||||
[COMPILING] bar v0.0.1 ({url}/bar)
|
[COMPILING] bar v0.0.1 ({url}/bar)
|
||||||
[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \
|
[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-C prefer-dynamic -g \
|
-C prefer-dynamic -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
-C extra-filename=[..] \
|
-C extra-filename=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
|
@ -848,13 +848,13 @@ suffix = env::consts::DLL_SUFFIX,
|
||||||
[COMPILING] bar v0.0.1 ({url}/bar)
|
[COMPILING] bar v0.0.1 ({url}/bar)
|
||||||
[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \
|
[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-C prefer-dynamic -g \
|
-C prefer-dynamic -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
-C extra-filename=[..] \
|
-C extra-filename=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
|
@ -1198,7 +1198,7 @@ fn verbose_build() {
|
||||||
execs().with_status(0).with_stderr(&format!("\
|
execs().with_status(0).with_stderr(&format!("\
|
||||||
[COMPILING] test v0.0.0 ({url})
|
[COMPILING] test v0.0.0 ({url})
|
||||||
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
|
@ -2443,7 +2443,7 @@ fn compiler_json_error_format() {
|
||||||
"reason":"compiler-artifact",
|
"reason":"compiler-artifact",
|
||||||
"profile": {
|
"profile": {
|
||||||
"debug_assertions": true,
|
"debug_assertions": true,
|
||||||
"debuginfo": true,
|
"debuginfo": 2,
|
||||||
"opt_level": "0",
|
"opt_level": "0",
|
||||||
"test": false
|
"test": false
|
||||||
},
|
},
|
||||||
|
@ -2475,7 +2475,7 @@ fn compiler_json_error_format() {
|
||||||
"target":{"kind":["bin"],"name":"foo","src_path":"[..]main.rs"},
|
"target":{"kind":["bin"],"name":"foo","src_path":"[..]main.rs"},
|
||||||
"profile": {
|
"profile": {
|
||||||
"debug_assertions": true,
|
"debug_assertions": true,
|
||||||
"debuginfo": true,
|
"debuginfo": 2,
|
||||||
"opt_level": "0",
|
"opt_level": "0",
|
||||||
"test": false
|
"test": false
|
||||||
},
|
},
|
||||||
|
@ -2537,7 +2537,7 @@ fn message_format_json_forward_stderr() {
|
||||||
"target":{"kind":["bin"],"name":"foo","src_path":"[..]"},
|
"target":{"kind":["bin"],"name":"foo","src_path":"[..]"},
|
||||||
"profile":{
|
"profile":{
|
||||||
"debug_assertions":true,
|
"debug_assertions":true,
|
||||||
"debuginfo":true,
|
"debuginfo":2,
|
||||||
"opt_level":"0",
|
"opt_level":"0",
|
||||||
"test":false
|
"test":false
|
||||||
},
|
},
|
||||||
|
|
|
@ -432,7 +432,7 @@ fn linker_and_ar() {
|
||||||
.with_stderr_contains(&format!("\
|
.with_stderr_contains(&format!("\
|
||||||
[COMPILING] foo v0.5.0 ({url})
|
[COMPILING] foo v0.5.0 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]foo.rs --crate-type bin \
|
[RUNNING] `rustc --crate-name foo src[/]foo.rs --crate-type bin \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir {dir}[/]target[/]{target}[/]debug[/]deps \
|
--out-dir {dir}[/]target[/]{target}[/]debug[/]deps \
|
||||||
--target {target} \
|
--target {target} \
|
||||||
|
|
|
@ -62,7 +62,38 @@ fn opt_level_override_0() {
|
||||||
[COMPILING] test v0.0.0 ({url})
|
[COMPILING] test v0.0.0 ({url})
|
||||||
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
|
-C metadata=[..] \
|
||||||
|
--out-dir [..] \
|
||||||
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
|
[FINISHED] [..] target(s) in [..]
|
||||||
|
",
|
||||||
|
dir = p.root().display(),
|
||||||
|
url = p.url()
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn debug_override_1() {
|
||||||
|
let mut p = project("foo");
|
||||||
|
|
||||||
|
p = p
|
||||||
|
.file("Cargo.toml", r#"
|
||||||
|
[package]
|
||||||
|
name = "test"
|
||||||
|
version = "0.0.0"
|
||||||
|
authors = []
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
debug = 1
|
||||||
|
"#)
|
||||||
|
.file("src/lib.rs", "");
|
||||||
|
assert_that(p.cargo_process("build").arg("-v"),
|
||||||
|
execs().with_status(0).with_stderr(&format!("\
|
||||||
|
[COMPILING] test v0.0.0 ({url})
|
||||||
|
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
||||||
|
--emit=dep-info,link \
|
||||||
|
-C debuginfo=1 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
|
@ -93,7 +124,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) {
|
||||||
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-C opt-level={level} \
|
-C opt-level={level} \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
-C debug-assertions=on \
|
-C debug-assertions=on \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
|
@ -164,7 +195,7 @@ fn top_level_overrides_deps() {
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-C prefer-dynamic \
|
-C prefer-dynamic \
|
||||||
-C opt-level=1 \
|
-C opt-level=1 \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir {dir}[/]target[/]release[/]deps \
|
--out-dir {dir}[/]target[/]release[/]deps \
|
||||||
-L dependency={dir}[/]target[/]release[/]deps`
|
-L dependency={dir}[/]target[/]release[/]deps`
|
||||||
|
@ -172,7 +203,7 @@ fn top_level_overrides_deps() {
|
||||||
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-C opt-level=1 \
|
-C opt-level=1 \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]release[/]deps \
|
-L dependency={dir}[/]target[/]release[/]deps \
|
||||||
|
|
|
@ -446,14 +446,14 @@ fast2"));
|
||||||
[COMPILING] bar v0.0.1 ({url}/bar)
|
[COMPILING] bar v0.0.1 ({url}/bar)
|
||||||
[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir {dir}[/]target[/]debug[/]deps \
|
--out-dir {dir}[/]target[/]debug[/]deps \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \
|
[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \
|
||||||
--emit=dep-info,link \
|
--emit=dep-info,link \
|
||||||
-g \
|
-C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir {dir}[/]target[/]debug[/]examples \
|
--out-dir {dir}[/]target[/]debug[/]examples \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps \
|
-L dependency={dir}[/]target[/]debug[/]deps \
|
||||||
|
|
|
@ -28,7 +28,7 @@ fn build_lib_for_foo() {
|
||||||
.with_stderr(format!("\
|
.with_stderr(format!("\
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
|
@ -57,7 +57,7 @@ fn lib() {
|
||||||
.with_stderr(format!("\
|
.with_stderr(format!("\
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C debug-assertions=off \
|
-C debug-assertions=off \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
|
@ -87,12 +87,12 @@ fn build_main_and_allow_unstable_options() {
|
||||||
.with_stderr(&format!("\
|
.with_stderr(&format!("\
|
||||||
[COMPILING] {name} v{version} ({url})
|
[COMPILING] {name} v{version} ({url})
|
||||||
[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \
|
[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
-L dependency={dir}[/]target[/]debug[/]deps`
|
-L dependency={dir}[/]target[/]debug[/]deps`
|
||||||
[RUNNING] `rustc --crate-name {name} src[/]main.rs --crate-type bin \
|
[RUNNING] `rustc --crate-name {name} src[/]main.rs --crate-type bin \
|
||||||
--emit=dep-info,link -g \
|
--emit=dep-info,link -C debuginfo=2 \
|
||||||
-C debug-assertions \
|
-C debug-assertions \
|
||||||
-C metadata=[..] \
|
-C metadata=[..] \
|
||||||
--out-dir [..] \
|
--out-dir [..] \
|
||||||
|
@ -151,11 +151,11 @@ fn build_with_args_to_one_of_multiple_binaries() {
|
||||||
.with_status(0)
|
.with_status(0)
|
||||||
.with_stderr(format!("\
|
.with_stderr(format!("\
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -g \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link \
|
||||||
-C metadata=[..] \
|
-C debuginfo=2 -C metadata=[..] \
|
||||||
--out-dir [..]`
|
--out-dir [..]`
|
||||||
[RUNNING] `rustc --crate-name bar src[/]bin[/]bar.rs --crate-type bin --emit=dep-info,link -g \
|
[RUNNING] `rustc --crate-name bar src[/]bin[/]bar.rs --crate-type bin --emit=dep-info,link \
|
||||||
-C debug-assertions [..]`
|
-C debuginfo=2 -C debug-assertions [..]`
|
||||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
||||||
", url = p.url())));
|
", url = p.url())));
|
||||||
}
|
}
|
||||||
|
@ -207,10 +207,10 @@ fn build_with_args_to_one_of_multiple_tests() {
|
||||||
.with_status(0)
|
.with_status(0)
|
||||||
.with_stderr(format!("\
|
.with_stderr(format!("\
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -g \
|
[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link \
|
||||||
-C metadata=[..] \
|
-C debuginfo=2 -C metadata=[..] \
|
||||||
--out-dir [..]`
|
--out-dir [..]`
|
||||||
[RUNNING] `rustc --crate-name bar tests[/]bar.rs --emit=dep-info,link -g \
|
[RUNNING] `rustc --crate-name bar tests[/]bar.rs --emit=dep-info,link -C debuginfo=2 \
|
||||||
-C debug-assertions [..]--test[..]`
|
-C debug-assertions [..]--test[..]`
|
||||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
||||||
", url = p.url())));
|
", url = p.url())));
|
||||||
|
@ -251,9 +251,9 @@ fn build_foo_with_bar_dependency() {
|
||||||
.with_status(0)
|
.with_status(0)
|
||||||
.with_stderr(format!("\
|
.with_stderr(format!("\
|
||||||
[COMPILING] bar v0.1.0 ([..])
|
[COMPILING] bar v0.1.0 ([..])
|
||||||
[RUNNING] `[..] -g [..]`
|
[RUNNING] `[..] -C debuginfo=2 [..]`
|
||||||
[COMPILING] foo v0.0.1 ({url})
|
[COMPILING] foo v0.0.1 ({url})
|
||||||
[RUNNING] `[..] -g -C debug-assertions [..]`
|
[RUNNING] `[..] -C debuginfo=2 -C debug-assertions [..]`
|
||||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
||||||
", url = foo.url())));
|
", url = foo.url())));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue