@@ -31,7 +31,7 @@ use rustc_session::config::{self, CrateType, Lto, OutputFilenames, OutputType};
31
31
use rustc_session:: config:: { Passes , SwitchWithOptPath } ;
32
32
use rustc_session:: Session ;
33
33
use rustc_span:: source_map:: SourceMap ;
34
- use rustc_span:: symbol:: { sym, Symbol } ;
34
+ use rustc_span:: symbol:: sym;
35
35
use rustc_span:: { BytePos , FileName , InnerSpan , Pos , Span } ;
36
36
use rustc_target:: spec:: { MergeFunctions , PanicStrategy , SanitizerSet } ;
37
37
@@ -426,21 +426,9 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
426
426
let ( coordinator_send, coordinator_receive) = channel ( ) ;
427
427
let sess = tcx. sess ;
428
428
429
- let crate_name = tcx. crate_name ( LOCAL_CRATE ) ;
430
429
let crate_attrs = tcx. hir ( ) . attrs ( rustc_hir:: CRATE_HIR_ID ) ;
431
430
let no_builtins = tcx. sess . contains_name ( crate_attrs, sym:: no_builtins) ;
432
431
let is_compiler_builtins = tcx. sess . contains_name ( crate_attrs, sym:: compiler_builtins) ;
433
- let subsystem = tcx. sess . first_attr_value_str_by_name ( crate_attrs, sym:: windows_subsystem) ;
434
- let windows_subsystem = subsystem. map ( |subsystem| {
435
- if subsystem != sym:: windows && subsystem != sym:: console {
436
- tcx. sess . fatal ( & format ! (
437
- "invalid windows subsystem `{}`, only \
438
- `windows` and `console` are allowed",
439
- subsystem
440
- ) ) ;
441
- }
442
- subsystem. to_string ( )
443
- } ) ;
444
432
445
433
let linker_info = LinkerInfo :: new ( tcx, target_cpu) ;
446
434
let crate_info = CrateInfo :: new ( tcx) ;
@@ -472,9 +460,7 @@ pub fn start_async_codegen<B: ExtraBackendMethods>(
472
460
473
461
OngoingCodegen {
474
462
backend,
475
- crate_name,
476
463
metadata,
477
- windows_subsystem,
478
464
linker_info,
479
465
crate_info,
480
466
@@ -1812,9 +1798,7 @@ impl SharedEmitterMain {
1812
1798
1813
1799
pub struct OngoingCodegen < B : ExtraBackendMethods > {
1814
1800
pub backend : B ,
1815
- pub crate_name : Symbol ,
1816
1801
pub metadata : EncodedMetadata ,
1817
- pub windows_subsystem : Option < String > ,
1818
1802
pub linker_info : LinkerInfo ,
1819
1803
pub crate_info : CrateInfo ,
1820
1804
pub coordinator_send : Sender < Box < dyn Any + Send > > ,
@@ -1857,9 +1841,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> {
1857
1841
1858
1842
(
1859
1843
CodegenResults {
1860
- crate_name : self . crate_name ,
1861
1844
metadata : self . metadata ,
1862
- windows_subsystem : self . windows_subsystem ,
1863
1845
linker_info : self . linker_info ,
1864
1846
crate_info : self . crate_info ,
1865
1847
0 commit comments