Skip to content

Commit 52b0fe5

Browse files
committed
refactor: only when -C debuginfo > 0 will spilt-debuginfo be passed
It was unnecessary to pass `spilt-debuginfo` if there is no debuginfo. Tests are touched here only for matching rustflags invocation stderr in the original test suite.
1 parent 55b34d7 commit 52b0fe5

File tree

9 files changed

+64
-64
lines changed

9 files changed

+64
-64
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,22 +1047,6 @@ fn build_base_args(
10471047

10481048
cmd.args(&lto_args(cx, unit));
10491049

1050-
// This is generally just an optimization on build time so if we don't pass
1051-
// it then it's ok. The values for the flag (off, packed, unpacked) may be supported
1052-
// or not depending on the platform, so availability is checked per-value.
1053-
// For example, at the time of writing this code, on Windows the only stable valid
1054-
// value for split-debuginfo is "packed", while on Linux "unpacked" is also stable.
1055-
if let Some(split) = split_debuginfo {
1056-
if cx
1057-
.bcx
1058-
.target_data
1059-
.info(unit.kind)
1060-
.supports_debuginfo_split(split)
1061-
{
1062-
cmd.arg("-C").arg(format!("split-debuginfo={}", split));
1063-
}
1064-
}
1065-
10661050
if let Some(backend) = codegen_backend {
10671051
cmd.arg("-Z").arg(&format!("codegen-backend={}", backend));
10681052
}
@@ -1074,7 +1058,23 @@ fn build_base_args(
10741058
let debuginfo = debuginfo.into_inner();
10751059
// Shorten the number of arguments if possible.
10761060
if debuginfo != TomlDebugInfo::None {
1077-
cmd.arg("-C").arg(format!("debuginfo={}", debuginfo));
1061+
cmd.arg("-C").arg(format!("debuginfo={debuginfo}"));
1062+
// This is generally just an optimization on build time so if we don't
1063+
// pass it then it's ok. The values for the flag (off, packed, unpacked)
1064+
// may be supported or not depending on the platform, so availability is
1065+
// checked per-value. For example, at the time of writing this code, on
1066+
// Windows the only stable valid value for split-debuginfo is "packed",
1067+
// while on Linux "unpacked" is also stable.
1068+
if let Some(split) = split_debuginfo {
1069+
if cx
1070+
.bcx
1071+
.target_data
1072+
.info(unit.kind)
1073+
.supports_debuginfo_split(split)
1074+
{
1075+
cmd.arg("-C").arg(format!("split-debuginfo={split}"));
1076+
}
1077+
}
10781078
}
10791079

10801080
cmd.args(unit.pkg.manifest().lint_rustflags());

tests/testsuite/build.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,13 +1334,13 @@ fn cargo_default_env_metadata_env_var() {
13341334
[COMPILING] bar v0.0.1 ([CWD]/bar)
13351335
[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type dylib \
13361336
--emit=[..]link \
1337-
-C prefer-dynamic[..]-C debuginfo=2 \
1337+
-C prefer-dynamic[..]-C debuginfo=2 [..]\
13381338
-C metadata=[..] \
13391339
--out-dir [..] \
13401340
-L dependency=[CWD]/target/debug/deps`
13411341
[COMPILING] foo v0.0.1 ([CWD])
13421342
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
1343-
--emit=[..]link[..]-C debuginfo=2 \
1343+
--emit=[..]link[..]-C debuginfo=2 [..]\
13441344
-C metadata=[..] \
13451345
-C extra-filename=[..] \
13461346
--out-dir [..] \
@@ -1362,13 +1362,13 @@ fn cargo_default_env_metadata_env_var() {
13621362
[COMPILING] bar v0.0.1 ([CWD]/bar)
13631363
[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type dylib \
13641364
--emit=[..]link \
1365-
-C prefer-dynamic[..]-C debuginfo=2 \
1365+
-C prefer-dynamic[..]-C debuginfo=2 [..]\
13661366
-C metadata=[..] \
13671367
--out-dir [..] \
13681368
-L dependency=[CWD]/target/debug/deps`
13691369
[COMPILING] foo v0.0.1 ([CWD])
13701370
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
1371-
--emit=[..]link[..]-C debuginfo=2 \
1371+
--emit=[..]link[..]-C debuginfo=2 [..]\
13721372
-C metadata=[..] \
13731373
-C extra-filename=[..] \
13741374
--out-dir [..] \
@@ -2053,7 +2053,7 @@ fn verbose_build() {
20532053
"\
20542054
[COMPILING] foo v0.0.1 ([CWD])
20552055
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
2056-
--emit=[..]link[..]-C debuginfo=2 \
2056+
--emit=[..]link[..]-C debuginfo=2 [..]\
20572057
-C metadata=[..] \
20582058
--out-dir [..] \
20592059
-L dependency=[CWD]/target/debug/deps`
@@ -5432,7 +5432,7 @@ fn targets_selected_all() {
54325432
// Unit tests.
54335433
.with_stderr_contains(
54345434
"[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\
5435-
-C debuginfo=2 --test [..]",
5435+
-C debuginfo=2 [..]--test [..]",
54365436
)
54375437
.run();
54385438
}
@@ -5449,7 +5449,7 @@ fn all_targets_no_lib() {
54495449
// Unit tests.
54505450
.with_stderr_contains(
54515451
"[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\
5452-
-C debuginfo=2 --test [..]",
5452+
-C debuginfo=2 [..]--test [..]",
54535453
)
54545454
.run();
54555455
}
@@ -5920,7 +5920,7 @@ fn build_lib_only() {
59205920
"\
59215921
[COMPILING] foo v0.0.1 ([CWD])
59225922
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
5923-
--emit=[..]link[..]-C debuginfo=2 \
5923+
--emit=[..]link[..]-C debuginfo=2 [..]\
59245924
-C metadata=[..] \
59255925
--out-dir [..] \
59265926
-L dependency=[CWD]/target/debug/deps`

tests/testsuite/build_script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ fn build_cmd_with_a_build_cmd() {
17551755
--extern a=[..]liba[..].rlib`
17561756
[RUNNING] `[..]/foo-[..]/build-script-build`
17571757
[RUNNING] `rustc --crate-name foo [..]lib.rs [..]--crate-type lib \
1758-
--emit=[..]link[..]-C debuginfo=2 \
1758+
--emit=[..]link[..]-C debuginfo=2 [..]\
17591759
-C metadata=[..] \
17601760
--out-dir [..] \
17611761
-L [..]target/debug/deps`

tests/testsuite/cross_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ fn linker() {
398398
"\
399399
[COMPILING] foo v0.5.0 ([CWD])
400400
[RUNNING] `rustc --crate-name foo src/foo.rs [..]--crate-type bin \
401-
--emit=[..]link[..]-C debuginfo=2 \
401+
--emit=[..]link[..]-C debuginfo=2 [..]\
402402
-C metadata=[..] \
403403
--out-dir [CWD]/target/{target}/debug/deps \
404404
--target {target} \

tests/testsuite/profile_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn profile_config_all_options() {
267267
-C panic=abort \
268268
-C lto[..]\
269269
-C codegen-units=2 \
270-
-C debuginfo=2 \
270+
-C debuginfo=2 [..]\
271271
-C debug-assertions=on \
272272
-C overflow-checks=off [..]\
273273
-C rpath [..]\

tests/testsuite/profile_targets.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ fn profile_selection_build() {
100100
[FINISHED] dev [unoptimized + debuginfo] [..]
101101
"
102102
)
103-
.with_stdout_does_not_contain("[..] -C debuginfo=0[..]")
103+
.with_stderr_does_not_contain("[..] -C debuginfo=0[..]")
104104
.run();
105105
p.cargo("build -vv")
106106
.with_stderr_unordered(
@@ -191,17 +191,17 @@ fn profile_selection_build_all_targets() {
191191
[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build`
192192
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
193193
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
194-
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 --test [..]`
194+
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]`
195195
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]`
196-
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 --test [..]`
197-
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 --test [..]`
198-
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 --test [..]`
196+
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]`
197+
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]`
198+
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]`
199199
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
200200
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
201201
[FINISHED] dev [unoptimized + debuginfo] [..]
202202
"
203203
)
204-
.with_stdout_does_not_contain("[..] -C debuginfo=0[..]")
204+
.with_stderr_does_not_contain("[..] -C debuginfo=0[..]")
205205
.run();
206206
p.cargo("build -vv")
207207
.with_stderr_unordered(
@@ -318,10 +318,10 @@ fn profile_selection_test() {
318318
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
319319
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..]
320320
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]
321-
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 --test [..]
322-
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 --test [..]
321+
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
322+
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
323323
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]
324-
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 --test [..]
324+
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
325325
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..]
326326
[FINISHED] test [unoptimized + debuginfo] [..]
327327
[RUNNING] `[..]/deps/foo-[..]`
@@ -516,10 +516,10 @@ fn profile_selection_check_all_targets() {
516516
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
517517
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
518518
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]
519-
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 --test [..]
520-
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 --test [..]
521-
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 --test [..]
522-
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 --test [..]
519+
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]
520+
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]
521+
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]
522+
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] --test [..]
523523
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
524524
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
525525
[FINISHED] dev [unoptimized + debuginfo] [..]
@@ -618,11 +618,11 @@ fn profile_selection_check_all_targets_test() {
618618
[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build`
619619
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
620620
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]
621-
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 --test [..]
622-
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 --test [..]
623-
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 --test [..]
624-
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 --test [..]
625-
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 --test [..]
621+
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
622+
[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
623+
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
624+
[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
625+
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] --test [..]
626626
[FINISHED] test [unoptimized + debuginfo] [..]
627627
").run();
628628

tests/testsuite/profiles.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn opt_level_override_0() {
6666
[COMPILING] test v0.0.0 ([CWD])
6767
[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \
6868
--emit=[..]link[..]\
69-
-C debuginfo=2 \
69+
-C debuginfo=2 [..]\
7070
-C metadata=[..] \
7171
--out-dir [..] \
7272
-L dependency=[CWD]/target/debug/deps`
@@ -99,7 +99,7 @@ fn debug_override_1() {
9999
[COMPILING] test v0.0.0 ([CWD])
100100
[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \
101101
--emit=[..]link[..]\
102-
-C debuginfo=1 \
102+
-C debuginfo=1 [..]\
103103
-C metadata=[..] \
104104
--out-dir [..] \
105105
-L dependency=[CWD]/target/debug/deps`
@@ -136,7 +136,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) {
136136
[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \
137137
--emit=[..]link \
138138
-C opt-level={level}[..]\
139-
-C debuginfo=2 \
139+
-C debuginfo=2 [..]\
140140
-C debug-assertions=on \
141141
-C metadata=[..] \
142142
--out-dir [..] \
@@ -211,15 +211,15 @@ fn top_level_overrides_deps() {
211211
--emit=[..]link \
212212
-C prefer-dynamic \
213213
-C opt-level=1[..]\
214-
-C debuginfo=2 \
214+
-C debuginfo=2 [..]\
215215
-C metadata=[..] \
216216
--out-dir [CWD]/target/release/deps \
217217
-L dependency=[CWD]/target/release/deps`
218218
[COMPILING] test v0.0.0 ([CWD])
219219
[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \
220220
--emit=[..]link \
221221
-C opt-level=1[..]\
222-
-C debuginfo=2 \
222+
-C debuginfo=2 [..]\
223223
-C metadata=[..] \
224224
--out-dir [..] \
225225
-L dependency=[CWD]/target/release/deps \

tests/testsuite/run.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,14 +777,14 @@ fast2",
777777
[COMPILING] bar v0.5.0 ([CWD]/bar)
778778
[RUNNING] `rustc --crate-name bar bar/src/bar.rs [..]--crate-type lib \
779779
--emit=[..]link[..]\
780-
-C debuginfo=2 \
780+
-C debuginfo=2 [..]\
781781
-C metadata=[..] \
782782
--out-dir [CWD]/target/debug/deps \
783783
-L dependency=[CWD]/target/debug/deps`
784784
[COMPILING] foo v0.0.1 ([CWD])
785785
[RUNNING] `rustc --crate-name a examples/a.rs [..]--crate-type bin \
786786
--emit=[..]link[..]\
787-
-C debuginfo=2 \
787+
-C debuginfo=2 [..]\
788788
-C metadata=[..] \
789789
--out-dir [CWD]/target/debug/examples \
790790
-L dependency=[CWD]/target/debug/deps \

tests/testsuite/rustc.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn build_lib_for_foo() {
1818
"\
1919
[COMPILING] foo v0.0.1 ([CWD])
2020
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
21-
--emit=[..]link[..]-C debuginfo=2 \
21+
--emit=[..]link[..]-C debuginfo=2 [..]\
2222
-C metadata=[..] \
2323
--out-dir [..] \
2424
-L dependency=[CWD]/target/debug/deps`
@@ -40,7 +40,7 @@ fn lib() {
4040
"\
4141
[COMPILING] foo v0.0.1 ([CWD])
4242
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \
43-
--emit=[..]link[..]-C debuginfo=2 \
43+
--emit=[..]link[..]-C debuginfo=2 [..]\
4444
-C debug-assertions=off \
4545
-C metadata=[..] \
4646
--out-dir [..] \
@@ -63,12 +63,12 @@ fn build_main_and_allow_unstable_options() {
6363
"\
6464
[COMPILING] {name} v{version} ([CWD])
6565
[RUNNING] `rustc --crate-name {name} src/lib.rs [..]--crate-type lib \
66-
--emit=[..]link[..]-C debuginfo=2 \
66+
--emit=[..]link[..]-C debuginfo=2 [..]\
6767
-C metadata=[..] \
6868
--out-dir [..] \
6969
-L dependency=[CWD]/target/debug/deps`
7070
[RUNNING] `rustc --crate-name {name} src/main.rs [..]--crate-type bin \
71-
--emit=[..]link[..]-C debuginfo=2 \
71+
--emit=[..]link[..]-C debuginfo=2 [..]\
7272
-C debug-assertions \
7373
-C metadata=[..] \
7474
--out-dir [..] \
@@ -109,10 +109,10 @@ fn build_with_args_to_one_of_multiple_binaries() {
109109
"\
110110
[COMPILING] foo v0.0.1 ([CWD])
111111
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]\
112-
-C debuginfo=2 -C metadata=[..] \
112+
-C debuginfo=2 [..]-C metadata=[..] \
113113
--out-dir [..]`
114114
[RUNNING] `rustc --crate-name bar src/bin/bar.rs [..]--crate-type bin --emit=[..]link[..]\
115-
-C debuginfo=2 -C debug-assertions [..]`
115+
-C debuginfo=2 [..]-C debug-assertions [..]`
116116
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
117117
",
118118
)
@@ -381,9 +381,9 @@ fn build_with_args_to_one_of_multiple_tests() {
381381
"\
382382
[COMPILING] foo v0.0.1 ([CWD])
383383
[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]\
384-
-C debuginfo=2 -C metadata=[..] \
384+
-C debuginfo=2 [..]-C metadata=[..] \
385385
--out-dir [..]`
386-
[RUNNING] `rustc --crate-name bar tests/bar.rs [..]--emit=[..]link[..]-C debuginfo=2 \
386+
[RUNNING] `rustc --crate-name bar tests/bar.rs [..]--emit=[..]link[..]-C debuginfo=2 [..]\
387387
-C debug-assertions [..]--test[..]`
388388
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
389389
",
@@ -420,7 +420,7 @@ fn build_foo_with_bar_dependency() {
420420
[COMPILING] bar v0.1.0 ([..])
421421
[RUNNING] `[..] -C debuginfo=2 [..]`
422422
[COMPILING] foo v0.0.1 ([CWD])
423-
[RUNNING] `[..] -C debuginfo=2 -C debug-assertions [..]`
423+
[RUNNING] `[..] -C debuginfo=2 [..]-C debug-assertions [..]`
424424
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
425425
",
426426
)
@@ -478,7 +478,7 @@ fn targets_selected_default() {
478478
// unit test
479479
.with_stderr_does_not_contain(
480480
"[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link \
481-
-C debuginfo=2 --test [..]",
481+
-C debuginfo=2 [..]--test [..]",
482482
)
483483
.run();
484484
}
@@ -495,7 +495,7 @@ fn targets_selected_all() {
495495
// unit test
496496
.with_stderr_contains(
497497
"[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\
498-
-C debuginfo=2 --test [..]",
498+
-C debuginfo=2 [..]--test [..]",
499499
)
500500
.run();
501501
}

0 commit comments

Comments
 (0)