Skip to content

Commit c1cd0bc

Browse files
dvdplmFirestar99
authored andcommitted
fix linker test
1 parent 011266e commit c1cd0bc

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rustc_codegen_spirv/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ tracing-tree = "0.4.0"
6464

6565
[dev-dependencies]
6666
pretty_assertions = "1.0"
67+
termcolor = "1.1.3"
6768

6869
# HACK(eddyb) can't re-introduce deps of `rustc_codegen_ssa`, for `pqp_cg_ssa`
6970
# (see `build.rs`).

crates/rustc_codegen_spirv/src/linker/test.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ use rustc_session::config::{Input, OutputFilenames, OutputTypes};
66
use rustc_span::FileName;
77
use std::io::Write;
88
use std::sync::{Arc, Mutex};
9-
10-
// `termcolor` is needed because we cannot construct an Emitter after it was added in
11-
// https://github.com/rust-lang/rust/pull/114104. This can be removed when
12-
// https://github.com/rust-lang/rust/pull/115393 lands.
13-
// We need to construct an emitter as yet another workaround,
14-
// see https://github.com/rust-lang/rust/pull/102992.
15-
extern crate termcolor;
169
use termcolor::{ColorSpec, WriteColor};
1710

1811
// https://github.com/colin-kiegel/rust-pretty-assertions/issues/24
@@ -162,7 +155,6 @@ fn link_with_linker_opts(
162155
rustc_interface::util::rustc_version_str().unwrap_or("unknown"),
163156
Default::default(),
164157
&rustc_driver_impl::USING_INTERNAL_FEATURES,
165-
Default::default(),
166158
);
167159

168160
// HACK(eddyb) inject `write_diags` into `sess`, to work around
@@ -171,7 +163,7 @@ fn link_with_linker_opts(
171163
let source_map = sess.psess.clone_source_map();
172164

173165
let emitter = rustc_errors::emitter::HumanEmitter::new(
174-
Box::new(buf),
166+
rustc_errors::AutoStream::new(Box::new(buf), rustc_errors::ColorChoice::Never),
175167
rustc_driver_impl::default_translator(),
176168
)
177169
.sm(Some(source_map.clone()));
@@ -193,6 +185,7 @@ fn link_with_linker_opts(
193185
"".into(),
194186
None,
195187
None,
188+
None,
196189
"".into(),
197190
OutputTypes::new(&[]),
198191
),

0 commit comments

Comments
 (0)