@@ -34,6 +34,10 @@ fn all_target_project() -> Project {
34
34
codegen-units = 3
35
35
[profile.bench]
36
36
codegen-units = 4
37
+ [profile.dev.build-override]
38
+ codegen-units = 5
39
+ [profile.release.build-override]
40
+ codegen-units = 6
37
41
"# ,
38
42
named_profiles = if is_nightly( ) {
39
43
"\" named-profiles\" , "
@@ -90,11 +94,11 @@ fn profile_selection_build() {
90
94
p. cargo ( "build -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( "\
91
95
[COMPILING] bar [..]
92
96
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
93
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
97
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
94
98
[COMPILING] bdep [..]
95
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
99
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
96
100
[COMPILING] foo [..]
97
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
101
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
98
102
[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build`
99
103
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
100
104
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
@@ -122,11 +126,11 @@ fn profile_selection_build_release() {
122
126
p. cargo ( "build --release -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( "\
123
127
[COMPILING] bar [..]
124
128
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
125
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
129
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
126
130
[COMPILING] bdep [..]
127
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
131
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
128
132
[COMPILING] foo [..]
129
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
133
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..]
130
134
[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build`
131
135
[foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
132
136
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
@@ -181,10 +185,11 @@ fn profile_selection_build_all_targets() {
181
185
[COMPILING] bar [..]
182
186
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
183
187
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
188
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
184
189
[COMPILING] bdep [..]
185
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
190
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
186
191
[COMPILING] foo [..]
187
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
192
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
188
193
[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build`
189
194
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
190
195
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
@@ -248,10 +253,11 @@ fn profile_selection_build_all_targets_release() {
248
253
[COMPILING] bar [..]
249
254
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..]
250
255
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
256
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
251
257
[COMPILING] bdep [..]
252
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
258
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
253
259
[COMPILING] foo [..]
254
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
260
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..]
255
261
[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build`
256
262
[foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
257
263
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]`
@@ -305,11 +311,12 @@ fn profile_selection_test() {
305
311
p. cargo ( "test -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( format ! ( "\
306
312
[COMPILING] bar [..]
307
313
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
314
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
308
315
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units={affected} -C debuginfo=2 [..]
309
316
[COMPILING] bdep [..]
310
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
317
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
311
318
[COMPILING] foo [..]
312
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
319
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
313
320
[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build`
314
321
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
315
322
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units={affected} -C debuginfo=2 [..]
@@ -372,12 +379,13 @@ fn profile_selection_test_release() {
372
379
//
373
380
p. cargo ( "test --release -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( format ! ( "\
374
381
[COMPILING] bar [..]
375
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
382
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
376
383
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
384
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C opt-level=3[..]-C codegen-units=2[..]
377
385
[COMPILING] bdep [..]
378
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
386
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
379
387
[COMPILING] foo [..]
380
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
388
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..]
381
389
[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build`
382
390
[foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
383
391
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
@@ -441,10 +449,11 @@ fn profile_selection_bench() {
441
449
[COMPILING] bar [..]
442
450
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units={affected} [..]
443
451
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units={affected} [..]
452
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
444
453
[COMPILING] bdep [..]
445
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units={affected} [..]
454
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
446
455
[COMPILING] foo [..]
447
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 [..]-C codegen-units={affected} [..]
456
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..]
448
457
[RUNNING] `[..]target/release/build/foo-[..]/build-script-build`
449
458
[foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
450
459
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units={affected} [..]
@@ -504,13 +513,13 @@ fn profile_selection_check_all_targets() {
504
513
//
505
514
p. cargo ( "check --all-targets -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( "\
506
515
[COMPILING] bar [..]
507
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
516
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
508
517
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]
509
518
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
510
519
[COMPILING] bdep[..]
511
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
520
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
512
521
[COMPILING] foo [..]
513
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
522
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
514
523
[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build`
515
524
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
516
525
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
@@ -550,13 +559,13 @@ fn profile_selection_check_all_targets_release() {
550
559
// `dev` for all targets.
551
560
p. cargo ( "check --all-targets --release -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( "\
552
561
[COMPILING] bar [..]
553
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
562
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..]
554
563
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 [..]
555
564
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
556
565
[COMPILING] bdep[..]
557
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
566
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link [..]-C codegen-units=6 [..]
558
567
[COMPILING] foo [..]
559
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 [..]-C codegen-units=2 [..]
568
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..]
560
569
[RUNNING] `[..]target/release/build/foo-[..]/build-script-build`
561
570
[foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3
562
571
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]
@@ -611,12 +620,12 @@ fn profile_selection_check_all_targets_test() {
611
620
//
612
621
p. cargo ( "check --all-targets --profile=test -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( format ! ( "\
613
622
[COMPILING] bar [..]
614
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
623
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
615
624
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units={affected} -C debuginfo=2 [..]
616
625
[COMPILING] bdep[..]
617
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
626
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
618
627
[COMPILING] foo [..]
619
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units={affected} -C debuginfo=2 [..]
628
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
620
629
[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build`
621
630
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
622
631
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units={affected} -C debuginfo=2 [..]
@@ -658,13 +667,13 @@ fn profile_selection_doc() {
658
667
p. cargo ( "doc -vv" ) . masquerade_as_nightly_cargo ( ) . with_stderr_unordered ( "\
659
668
[COMPILING] bar [..]
660
669
[DOCUMENTING] bar [..]
661
- [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
670
+ [RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
662
671
[RUNNING] `rustdoc [..]--crate-name bar bar/src/lib.rs [..]
663
672
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
664
673
[COMPILING] bdep [..]
665
- [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
674
+ [RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
666
675
[COMPILING] foo [..]
667
- [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
676
+ [RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 -C debuginfo=2 [..]
668
677
[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build`
669
678
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
670
679
[DOCUMENTING] foo [..]
0 commit comments