4
4
// files are exactly what is expected, no more, no less.
5
5
// See https://github.com/rust-lang/rust/pull/12020
6
6
7
+ //@ ignore-nvptx64 (needs target std)
8
+
7
9
use std:: path:: PathBuf ;
8
10
9
11
use run_make_support:: {
10
12
bin_name, dynamic_lib_name, filename_not_in_denylist, rfs, rust_lib_name, rustc,
11
- shallow_find_files, static_lib_name,
13
+ shallow_find_files, static_lib_name, target ,
12
14
} ;
13
15
14
16
// Each test takes 4 arguments:
@@ -17,6 +19,7 @@ use run_make_support::{
17
19
// `dir`: the name of the directory where the test happens
18
20
// `rustc_invocation`: the rustc command being tested
19
21
// Any unexpected output files not listed in `must_exist` or `can_exist` will cause a failure.
22
+ #[ track_caller]
20
23
fn assert_expected_output_files ( expectations : Expectations , rustc_invocation : impl Fn ( ) ) {
21
24
let Expectations { expected_files : must_exist, allowed_files : can_exist, test_dir : dir } =
22
25
expectations;
@@ -58,35 +61,40 @@ macro_rules! s {
58
61
fn main ( ) {
59
62
let bin_foo = bin_name ( "foo" ) ;
60
63
61
- assert_expected_output_files (
62
- Expectations {
63
- expected_files : s ! [
64
- static_lib_name( "bar" ) ,
65
- dynamic_lib_name( "bar" ) ,
66
- rust_lib_name( "bar" )
67
- ] ,
68
- allowed_files : s ! [
69
- "libbar.dll.exp" ,
70
- "libbar.dll.lib" ,
71
- "libbar.pdb" ,
72
- "libbar.dll.a" ,
73
- "libbar.exe.a" ,
74
- "bar.dll.exp" ,
75
- "bar.dll.lib" ,
76
- "bar.pdb" ,
77
- "bar.dll.a" ,
78
- "bar.exe.a"
79
- ] ,
80
- test_dir : "three-crates" . to_string ( ) ,
81
- } ,
82
- || {
83
- rustc ( )
84
- . input ( "foo.rs" )
85
- . out_dir ( "three-crates" )
86
- . crate_type ( "rlib,dylib,staticlib" )
87
- . run ( ) ;
88
- } ,
89
- ) ;
64
+ let expect_dylib = !( target ( ) . contains ( "wasm" ) || target ( ) . contains ( "musl" ) ) ;
65
+
66
+ if expect_dylib {
67
+ assert_expected_output_files (
68
+ Expectations {
69
+ expected_files : s ! [
70
+ static_lib_name( "bar" ) ,
71
+ dynamic_lib_name( "bar" ) ,
72
+ rust_lib_name( "bar" )
73
+ ] ,
74
+ allowed_files : s ! [
75
+ "libbar.dll.exp" ,
76
+ "libbar.dll.lib" ,
77
+ "libbar.pdb" ,
78
+ "libbar.dll.a" ,
79
+ "libbar.exe.a" ,
80
+ "bar.dll.exp" ,
81
+ "bar.dll.lib" ,
82
+ "bar.pdb" ,
83
+ "bar.dll.a" ,
84
+ "bar.exe.a"
85
+ ] ,
86
+ test_dir : "three-crates" . to_string ( ) ,
87
+ } ,
88
+ || {
89
+ rustc ( )
90
+ . target ( target ( ) )
91
+ . input ( "foo.rs" )
92
+ . out_dir ( "three-crates" )
93
+ . crate_type ( "rlib,dylib,staticlib" )
94
+ . run ( ) ;
95
+ } ,
96
+ ) ;
97
+ }
90
98
91
99
assert_expected_output_files (
92
100
Expectations {
@@ -95,7 +103,7 @@ fn main() {
95
103
test_dir : "bin-crate" . to_string ( ) ,
96
104
} ,
97
105
|| {
98
- rustc ( ) . input ( "foo.rs" ) . crate_type ( "bin" ) . out_dir ( "bin-crate" ) . run ( ) ;
106
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . crate_type ( "bin" ) . out_dir ( "bin-crate" ) . run ( ) ;
99
107
} ,
100
108
) ;
101
109
@@ -106,7 +114,12 @@ fn main() {
106
114
test_dir : "all-emit" . to_string ( ) ,
107
115
} ,
108
116
|| {
109
- rustc ( ) . input ( "foo.rs" ) . emit ( "asm,llvm-ir,llvm-bc,obj,link" ) . out_dir ( "all-emit" ) . run ( ) ;
117
+ rustc ( )
118
+ . target ( target ( ) )
119
+ . input ( "foo.rs" )
120
+ . emit ( "asm,llvm-ir,llvm-bc,obj,link" )
121
+ . out_dir ( "all-emit" )
122
+ . run ( ) ;
110
123
} ,
111
124
) ;
112
125
@@ -117,7 +130,7 @@ fn main() {
117
130
test_dir : "asm-emit" . to_string ( ) ,
118
131
} ,
119
132
|| {
120
- rustc ( ) . input ( "foo.rs" ) . emit ( "asm" ) . output ( "asm-emit/foo" ) . run ( ) ;
133
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "asm" ) . output ( "asm-emit/foo" ) . run ( ) ;
121
134
} ,
122
135
) ;
123
136
assert_expected_output_files (
@@ -127,7 +140,7 @@ fn main() {
127
140
test_dir : "asm-emit2" . to_string ( ) ,
128
141
} ,
129
142
|| {
130
- rustc ( ) . input ( "foo.rs" ) . emit ( "asm=asm-emit2/foo" ) . run ( ) ;
143
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "asm=asm-emit2/foo" ) . run ( ) ;
131
144
} ,
132
145
) ;
133
146
assert_expected_output_files (
@@ -137,7 +150,7 @@ fn main() {
137
150
test_dir : "asm-emit3" . to_string ( ) ,
138
151
} ,
139
152
|| {
140
- rustc ( ) . input ( "foo.rs" ) . arg ( "--emit=asm=asm-emit3/foo" ) . run ( ) ;
153
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . arg ( "--emit=asm=asm-emit3/foo" ) . run ( ) ;
141
154
} ,
142
155
) ;
143
156
@@ -148,7 +161,12 @@ fn main() {
148
161
test_dir : "llvm-ir-emit" . to_string ( ) ,
149
162
} ,
150
163
|| {
151
- rustc ( ) . input ( "foo.rs" ) . emit ( "llvm-ir" ) . output ( "llvm-ir-emit/foo" ) . run ( ) ;
164
+ rustc ( )
165
+ . target ( target ( ) )
166
+ . input ( "foo.rs" )
167
+ . emit ( "llvm-ir" )
168
+ . output ( "llvm-ir-emit/foo" )
169
+ . run ( ) ;
152
170
} ,
153
171
) ;
154
172
assert_expected_output_files (
@@ -158,7 +176,7 @@ fn main() {
158
176
test_dir : "llvm-ir-emit2" . to_string ( ) ,
159
177
} ,
160
178
|| {
161
- rustc ( ) . input ( "foo.rs" ) . emit ( "llvm-ir=llvm-ir-emit2/foo" ) . run ( ) ;
179
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "llvm-ir=llvm-ir-emit2/foo" ) . run ( ) ;
162
180
} ,
163
181
) ;
164
182
assert_expected_output_files (
@@ -168,7 +186,7 @@ fn main() {
168
186
test_dir : "llvm-ir-emit3" . to_string ( ) ,
169
187
} ,
170
188
|| {
171
- rustc ( ) . input ( "foo.rs" ) . arg ( "--emit=llvm-ir=llvm-ir-emit3/foo" ) . run ( ) ;
189
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . arg ( "--emit=llvm-ir=llvm-ir-emit3/foo" ) . run ( ) ;
172
190
} ,
173
191
) ;
174
192
@@ -179,7 +197,12 @@ fn main() {
179
197
test_dir : "llvm-bc-emit" . to_string ( ) ,
180
198
} ,
181
199
|| {
182
- rustc ( ) . input ( "foo.rs" ) . emit ( "llvm-bc" ) . output ( "llvm-bc-emit/foo" ) . run ( ) ;
200
+ rustc ( )
201
+ . target ( target ( ) )
202
+ . input ( "foo.rs" )
203
+ . emit ( "llvm-bc" )
204
+ . output ( "llvm-bc-emit/foo" )
205
+ . run ( ) ;
183
206
} ,
184
207
) ;
185
208
assert_expected_output_files (
@@ -189,7 +212,7 @@ fn main() {
189
212
test_dir : "llvm-bc-emit2" . to_string ( ) ,
190
213
} ,
191
214
|| {
192
- rustc ( ) . input ( "foo.rs" ) . emit ( "llvm-bc=llvm-bc-emit2/foo" ) . run ( ) ;
215
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "llvm-bc=llvm-bc-emit2/foo" ) . run ( ) ;
193
216
} ,
194
217
) ;
195
218
assert_expected_output_files (
@@ -199,7 +222,7 @@ fn main() {
199
222
test_dir : "llvm-bc-emit3" . to_string ( ) ,
200
223
} ,
201
224
|| {
202
- rustc ( ) . input ( "foo.rs" ) . arg ( "--emit=llvm-bc=llvm-bc-emit3/foo" ) . run ( ) ;
225
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . arg ( "--emit=llvm-bc=llvm-bc-emit3/foo" ) . run ( ) ;
203
226
} ,
204
227
) ;
205
228
@@ -210,7 +233,7 @@ fn main() {
210
233
test_dir : "obj-emit" . to_string ( ) ,
211
234
} ,
212
235
|| {
213
- rustc ( ) . input ( "foo.rs" ) . emit ( "obj" ) . output ( "obj-emit/foo" ) . run ( ) ;
236
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "obj" ) . output ( "obj-emit/foo" ) . run ( ) ;
214
237
} ,
215
238
) ;
216
239
assert_expected_output_files (
@@ -220,7 +243,7 @@ fn main() {
220
243
test_dir : "obj-emit2" . to_string ( ) ,
221
244
} ,
222
245
|| {
223
- rustc ( ) . input ( "foo.rs" ) . emit ( "obj=obj-emit2/foo" ) . run ( ) ;
246
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . emit ( "obj=obj-emit2/foo" ) . run ( ) ;
224
247
} ,
225
248
) ;
226
249
assert_expected_output_files (
@@ -230,7 +253,7 @@ fn main() {
230
253
test_dir : "obj-emit3" . to_string ( ) ,
231
254
} ,
232
255
|| {
233
- rustc ( ) . input ( "foo.rs" ) . arg ( "--emit=obj=obj-emit3/foo" ) . run ( ) ;
256
+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . arg ( "--emit=obj=obj-emit3/foo" ) . run ( ) ;
234
257
} ,
235
258
) ;
236
259
@@ -241,7 +264,12 @@ fn main() {
241
264
test_dir : "link-emit" . to_string ( ) ,
242
265
} ,
243
266
|| {
244
- rustc ( ) . input ( "foo.rs" ) . emit ( "link" ) . output ( "link-emit/" . to_owned ( ) + & bin_foo) . run ( ) ;
267
+ rustc ( )
268
+ . target ( target ( ) )
269
+ . input ( "foo.rs" )
270
+ . emit ( "link" )
271
+ . output ( "link-emit/" . to_owned ( ) + & bin_foo)
272
+ . run ( ) ;
245
273
} ,
246
274
) ;
247
275
assert_expected_output_files (
@@ -251,7 +279,11 @@ fn main() {
251
279
test_dir : "link-emit2" . to_string ( ) ,
252
280
} ,
253
281
|| {
254
- rustc ( ) . input ( "foo.rs" ) . emit ( & format ! ( "link=link-emit2/{bin_foo}" ) ) . run ( ) ;
282
+ rustc ( )
283
+ . target ( target ( ) )
284
+ . input ( "foo.rs" )
285
+ . emit ( & format ! ( "link=link-emit2/{bin_foo}" ) )
286
+ . run ( ) ;
255
287
} ,
256
288
) ;
257
289
assert_expected_output_files (
@@ -261,7 +293,11 @@ fn main() {
261
293
test_dir : "link-emit3" . to_string ( ) ,
262
294
} ,
263
295
|| {
264
- rustc ( ) . input ( "foo.rs" ) . arg ( & format ! ( "--emit=link=link-emit3/{bin_foo}" ) ) . run ( ) ;
296
+ rustc ( )
297
+ . target ( target ( ) )
298
+ . input ( "foo.rs" )
299
+ . arg ( & format ! ( "--emit=link=link-emit3/{bin_foo}" ) )
300
+ . run ( ) ;
265
301
} ,
266
302
) ;
267
303
@@ -272,7 +308,7 @@ fn main() {
272
308
test_dir : "rlib" . to_string ( ) ,
273
309
} ,
274
310
|| {
275
- rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . output ( "rlib/foo" ) . run ( ) ;
311
+ rustc ( ) . target ( target ( ) ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . output ( "rlib/foo" ) . run ( ) ;
276
312
} ,
277
313
) ;
278
314
assert_expected_output_files (
@@ -281,105 +317,125 @@ fn main() {
281
317
allowed_files : vec ! [ ] ,
282
318
test_dir : "rlib2" . to_string ( ) ,
283
319
} ,
284
- || {
285
- rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . emit ( "link=rlib2/foo" ) . run ( ) ;
286
- } ,
287
- ) ;
288
- assert_expected_output_files (
289
- Expectations {
290
- expected_files : s ! [ "foo" ] ,
291
- allowed_files : vec ! [ ] ,
292
- test_dir : "rlib3" . to_string ( ) ,
293
- } ,
294
- || {
295
- rustc ( ) . crate_type ( "rlib" ) . input ( "foo.rs" ) . arg ( "--emit=link=rlib3/foo" ) . run ( ) ;
296
- } ,
297
- ) ;
298
-
299
- assert_expected_output_files (
300
- Expectations {
301
- expected_files : s ! [ bin_foo] ,
302
- allowed_files : s ! [
303
- "libfoo.dll.exp" ,
304
- "libfoo.dll.lib" ,
305
- "libfoo.pdb" ,
306
- "libfoo.dll.a" ,
307
- "libfoo.exe.a" ,
308
- "foo.dll.exp" ,
309
- "foo.dll.lib" ,
310
- "foo.pdb" ,
311
- "foo.dll.a" ,
312
- "foo.exe.a"
313
- ] ,
314
- test_dir : "dylib" . to_string ( ) ,
315
- } ,
316
- || {
317
- rustc ( )
318
- . crate_type ( "dylib" )
319
- . input ( "foo.rs" )
320
- . output ( "dylib/" . to_owned ( ) + & bin_foo)
321
- . run ( ) ;
322
- } ,
323
- ) ;
324
- assert_expected_output_files (
325
- Expectations {
326
- expected_files : s ! [ bin_foo] ,
327
- allowed_files : s ! [
328
- "libfoo.dll.exp" ,
329
- "libfoo.dll.lib" ,
330
- "libfoo.pdb" ,
331
- "libfoo.dll.a" ,
332
- "libfoo.exe.a" ,
333
- "foo.dll.exp" ,
334
- "foo.dll.lib" ,
335
- "foo.pdb" ,
336
- "foo.dll.a" ,
337
- "foo.exe.a"
338
- ] ,
339
- test_dir : "dylib2" . to_string ( ) ,
340
- } ,
341
320
|| {
342
321
rustc ( )
343
- . crate_type ( "dylib" )
322
+ . target ( target ( ) )
323
+ . crate_type ( "rlib" )
344
324
. input ( "foo.rs" )
345
- . emit ( & format ! ( "link=dylib2/{bin_foo}" ) )
325
+ . emit ( "link=rlib2/foo" )
346
326
. run ( ) ;
347
327
} ,
348
328
) ;
349
329
assert_expected_output_files (
350
330
Expectations {
351
- expected_files : s ! [ bin_foo] ,
352
- allowed_files : s ! [
353
- "libfoo.dll.exp" ,
354
- "libfoo.dll.lib" ,
355
- "libfoo.pdb" ,
356
- "libfoo.dll.a" ,
357
- "libfoo.exe.a" ,
358
- "foo.dll.exp" ,
359
- "foo.dll.lib" ,
360
- "foo.pdb" ,
361
- "foo.dll.a" ,
362
- "foo.exe.a"
363
- ] ,
364
- test_dir : "dylib3" . to_string ( ) ,
331
+ expected_files : s ! [ "foo" ] ,
332
+ allowed_files : vec ! [ ] ,
333
+ test_dir : "rlib3" . to_string ( ) ,
365
334
} ,
366
335
|| {
367
336
rustc ( )
368
- . crate_type ( "dylib" )
337
+ . target ( target ( ) )
338
+ . crate_type ( "rlib" )
369
339
. input ( "foo.rs" )
370
- . arg ( & format ! ( "--emit=link=dylib3/{bin_foo}" ) )
340
+ . arg ( "--emit=link=rlib3/foo" )
371
341
. run ( ) ;
372
342
} ,
373
343
) ;
374
344
345
+ if expect_dylib {
346
+ assert_expected_output_files (
347
+ Expectations {
348
+ expected_files : s ! [ bin_foo] ,
349
+ allowed_files : s ! [
350
+ "libfoo.dll.exp" ,
351
+ "libfoo.dll.lib" ,
352
+ "libfoo.pdb" ,
353
+ "libfoo.dll.a" ,
354
+ "libfoo.exe.a" ,
355
+ "foo.dll.exp" ,
356
+ "foo.dll.lib" ,
357
+ "foo.pdb" ,
358
+ "foo.dll.a" ,
359
+ "foo.exe.a"
360
+ ] ,
361
+ test_dir : "dylib" . to_string ( ) ,
362
+ } ,
363
+ || {
364
+ rustc ( )
365
+ . target ( target ( ) )
366
+ . crate_type ( "dylib" )
367
+ . input ( "foo.rs" )
368
+ . output ( "dylib/" . to_owned ( ) + & bin_foo)
369
+ . run ( ) ;
370
+ } ,
371
+ ) ;
372
+ assert_expected_output_files (
373
+ Expectations {
374
+ expected_files : s ! [ bin_foo] ,
375
+ allowed_files : s ! [
376
+ "libfoo.dll.exp" ,
377
+ "libfoo.dll.lib" ,
378
+ "libfoo.pdb" ,
379
+ "libfoo.dll.a" ,
380
+ "libfoo.exe.a" ,
381
+ "foo.dll.exp" ,
382
+ "foo.dll.lib" ,
383
+ "foo.pdb" ,
384
+ "foo.dll.a" ,
385
+ "foo.exe.a"
386
+ ] ,
387
+ test_dir : "dylib2" . to_string ( ) ,
388
+ } ,
389
+ || {
390
+ rustc ( )
391
+ . target ( target ( ) )
392
+ . crate_type ( "dylib" )
393
+ . input ( "foo.rs" )
394
+ . emit ( & format ! ( "link=dylib2/{bin_foo}" ) )
395
+ . run ( ) ;
396
+ } ,
397
+ ) ;
398
+ assert_expected_output_files (
399
+ Expectations {
400
+ expected_files : s ! [ bin_foo] ,
401
+ allowed_files : s ! [
402
+ "libfoo.dll.exp" ,
403
+ "libfoo.dll.lib" ,
404
+ "libfoo.pdb" ,
405
+ "libfoo.dll.a" ,
406
+ "libfoo.exe.a" ,
407
+ "foo.dll.exp" ,
408
+ "foo.dll.lib" ,
409
+ "foo.pdb" ,
410
+ "foo.dll.a" ,
411
+ "foo.exe.a"
412
+ ] ,
413
+ test_dir : "dylib3" . to_string ( ) ,
414
+ } ,
415
+ || {
416
+ rustc ( )
417
+ . target ( target ( ) )
418
+ . crate_type ( "dylib" )
419
+ . input ( "foo.rs" )
420
+ . arg ( & format ! ( "--emit=link=dylib3/{bin_foo}" ) )
421
+ . run ( ) ;
422
+ } ,
423
+ ) ;
424
+ }
425
+
375
426
assert_expected_output_files (
376
427
Expectations {
377
428
expected_files : s ! [ "foo" ] ,
378
429
allowed_files : vec ! [ ] ,
379
430
test_dir : "staticlib" . to_string ( ) ,
380
431
} ,
381
432
|| {
382
- rustc ( ) . crate_type ( "staticlib" ) . input ( "foo.rs" ) . output ( "staticlib/foo" ) . run ( ) ;
433
+ rustc ( )
434
+ . target ( target ( ) )
435
+ . crate_type ( "staticlib" )
436
+ . input ( "foo.rs" )
437
+ . output ( "staticlib/foo" )
438
+ . run ( ) ;
383
439
} ,
384
440
) ;
385
441
assert_expected_output_files (
@@ -389,7 +445,12 @@ fn main() {
389
445
test_dir : "staticlib2" . to_string ( ) ,
390
446
} ,
391
447
|| {
392
- rustc ( ) . crate_type ( "staticlib" ) . input ( "foo.rs" ) . emit ( "link=staticlib2/foo" ) . run ( ) ;
448
+ rustc ( )
449
+ . target ( target ( ) )
450
+ . crate_type ( "staticlib" )
451
+ . input ( "foo.rs" )
452
+ . emit ( "link=staticlib2/foo" )
453
+ . run ( ) ;
393
454
} ,
394
455
) ;
395
456
assert_expected_output_files (
@@ -399,7 +460,12 @@ fn main() {
399
460
test_dir : "staticlib3" . to_string ( ) ,
400
461
} ,
401
462
|| {
402
- rustc ( ) . crate_type ( "staticlib" ) . input ( "foo.rs" ) . arg ( "--emit=link=staticlib3/foo" ) . run ( ) ;
463
+ rustc ( )
464
+ . target ( target ( ) )
465
+ . crate_type ( "staticlib" )
466
+ . input ( "foo.rs" )
467
+ . arg ( "--emit=link=staticlib3/foo" )
468
+ . run ( ) ;
403
469
} ,
404
470
) ;
405
471
@@ -411,6 +477,7 @@ fn main() {
411
477
} ,
412
478
|| {
413
479
rustc ( )
480
+ . target ( target ( ) )
414
481
. crate_type ( "bin" )
415
482
. input ( "foo.rs" )
416
483
. output ( "bincrate/" . to_owned ( ) + & bin_foo)
@@ -425,6 +492,7 @@ fn main() {
425
492
} ,
426
493
|| {
427
494
rustc ( )
495
+ . target ( target ( ) )
428
496
. crate_type ( "bin" )
429
497
. input ( "foo.rs" )
430
498
. emit ( & format ! ( "link=bincrate2/{bin_foo}" ) )
@@ -439,6 +507,7 @@ fn main() {
439
507
} ,
440
508
|| {
441
509
rustc ( )
510
+ . target ( target ( ) )
442
511
. crate_type ( "bin" )
443
512
. input ( "foo.rs" )
444
513
. arg ( & format ! ( "--emit=link=bincrate3/{bin_foo}" ) )
@@ -454,6 +523,7 @@ fn main() {
454
523
} ,
455
524
|| {
456
525
rustc ( )
526
+ . target ( target ( ) )
457
527
. input ( "foo.rs" )
458
528
. emit ( "llvm-ir=rlib-ir/ir" )
459
529
. emit ( "link" )
@@ -471,6 +541,7 @@ fn main() {
471
541
} ,
472
542
|| {
473
543
rustc ( )
544
+ . target ( target ( ) )
474
545
. input ( "foo.rs" )
475
546
. emit ( "asm=staticlib-all/asm" )
476
547
. emit ( "llvm-ir=staticlib-all/ir" )
@@ -489,6 +560,7 @@ fn main() {
489
560
} ,
490
561
|| {
491
562
rustc ( )
563
+ . target ( target ( ) )
492
564
. input ( "foo.rs" )
493
565
. arg ( "--emit=asm=staticlib-all2/asm" )
494
566
. arg ( "--emit" )
@@ -510,6 +582,7 @@ fn main() {
510
582
} ,
511
583
|| {
512
584
rustc ( )
585
+ . target ( target ( ) )
513
586
. input ( "foo.rs" )
514
587
. emit ( "asm,llvm-ir,llvm-bc,obj,link" )
515
588
. crate_type ( "staticlib" )
@@ -529,6 +602,7 @@ fn main() {
529
602
|| {
530
603
rfs:: rename ( "staticlib-all3/bar.bc" , "rlib-emits/foo.bc" ) ;
531
604
rustc ( )
605
+ . target ( target ( ) )
532
606
. input ( "foo.rs" )
533
607
. emit ( "llvm-bc,link" )
534
608
. crate_type ( "rlib" )
0 commit comments