File tree 4 files changed +14
-17
lines changed
4 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -3868,7 +3868,6 @@ dependencies = [
3868
3868
" rustc_feature" ,
3869
3869
" rustc_fs_util" ,
3870
3870
" rustc_index" ,
3871
- " rustc_jobserver" ,
3872
3871
" rustc_target" ,
3873
3872
" serialize" ,
3874
3873
" syntax_pos" ,
Original file line number Diff line number Diff line change @@ -181,6 +181,20 @@ pub fn run_compiler_in_existing_thread_pool<R>(
181
181
182
182
pub fn run_compiler < R : Send > ( mut config : Config , f : impl FnOnce ( & Compiler ) -> R + Send ) -> R {
183
183
let stderr = config. stderr . take ( ) ;
184
+
185
+ if config. opts . debugging_opts . jobserver_token_requests {
186
+ if let config:: ErrorOutputType :: Json { .. } = config. opts . error_format {
187
+ if stderr. is_some ( ) {
188
+ panic ! ( "Non-default output not supported with -Zjobserver-token-requests" ) ;
189
+ }
190
+ } else {
191
+ panic ! ( "-Zjobserver-token-requests can only be specified if using \
192
+ JSON error output type") ;
193
+ }
194
+ }
195
+
196
+ rustc_jobserver:: initialize ( config. opts . debugging_opts . jobserver_token_requests ) ;
197
+
184
198
util:: spawn_thread_pool (
185
199
config. opts . edition ,
186
200
config. opts . debugging_opts . threads ,
Original file line number Diff line number Diff line change @@ -19,4 +19,3 @@ syntax_pos = { path = "../libsyntax_pos" }
19
19
rustc_index = { path = " ../librustc_index" }
20
20
rustc_fs_util = { path = " ../librustc_fs_util" }
21
21
num_cpus = " 1.0"
22
- rustc_jobserver = { path = " ../librustc_jobserver" }
Original file line number Diff line number Diff line change @@ -1126,21 +1126,6 @@ fn build_session_(
1126
1126
CguReuseTracker :: new_disabled ( )
1127
1127
} ;
1128
1128
1129
- if sopts. debugging_opts . jobserver_token_requests {
1130
- if let config:: ErrorOutputType :: Json { .. } = sopts. error_format {
1131
- if is_diagnostic_output_raw {
1132
- panic ! ( "Raw output format not supported with -Zjobserver-token-requests" ) ;
1133
- }
1134
- } else {
1135
- parse_sess. span_diagnostic
1136
- . fatal ( "-Zjobserver-token-requests can only be specified if \
1137
- using JSON error output type")
1138
- . raise ( ) ;
1139
- }
1140
- }
1141
-
1142
- rustc_jobserver:: initialize ( sopts. debugging_opts . jobserver_token_requests ) ;
1143
-
1144
1129
let sess = Session {
1145
1130
target : target_cfg,
1146
1131
host,
You can’t perform that action at this time.
0 commit comments