@@ -82,7 +82,10 @@ fn profile_selection_build() {
82
82
// NOTES:
83
83
// - bdep `panic` is not set because it thinks `build.rs` is a plugin.
84
84
// - build_script_build is built without panic because it thinks `build.rs` is a plugin.
85
- p. cargo ( "build -vv" ) . with_stderr_unordered ( "\
85
+ // - We make sure that the build dependencies bar, bdep, and build.rs
86
+ // are built without debuginfo.
87
+ p. cargo ( "build -vv" )
88
+ . with_stderr_unordered ( "\
86
89
[COMPILING] bar [..]
87
90
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
88
91
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..]
@@ -95,7 +98,12 @@ fn profile_selection_build() {
95
98
[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
96
99
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
97
100
[FINISHED] dev [unoptimized + debuginfo] [..]
98
- " ) . run ( ) ;
101
+ "
102
+ )
103
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
104
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
105
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
106
+ . run ( ) ;
99
107
p. cargo ( "build -vv" )
100
108
. with_stderr_unordered (
101
109
"\
@@ -149,6 +157,8 @@ fn profile_selection_build_all_targets() {
149
157
// `build.rs` is a plugin.
150
158
// - Benchmark dependencies are compiled in `dev` mode, which may be
151
159
// surprising. See issue rust-lang/cargo#4929.
160
+ // - We make sure that the build dependencies bar, bdep, and build.rs
161
+ // are built without debuginfo.
152
162
//
153
163
// - Dependency profiles:
154
164
// Pkg Target Profile Reason
@@ -169,7 +179,8 @@ fn profile_selection_build_all_targets() {
169
179
// bin dev dev
170
180
// bin dev build
171
181
// example dev build
172
- p. cargo ( "build --all-targets -vv" ) . with_stderr_unordered ( "\
182
+ p. cargo ( "build --all-targets -vv" )
183
+ . with_stderr_unordered ( "\
173
184
[COMPILING] bar [..]
174
185
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]
175
186
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]
@@ -189,7 +200,12 @@ fn profile_selection_build_all_targets() {
189
200
[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
190
201
[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]`
191
202
[FINISHED] dev [unoptimized + debuginfo] [..]
192
- " ) . run ( ) ;
203
+ "
204
+ )
205
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
206
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
207
+ . with_stderr_line_without ( & [ "[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]-C codegen-units=5 [..]" ] , & [ "-C debuginfo" ] )
208
+ . run ( ) ;
193
209
p. cargo ( "build -vv" )
194
210
. with_stderr_unordered (
195
211
"\
0 commit comments