Skip to content

Commit 2fb70e2

Browse files
committed
[rebase] Fill out some TODO comments in back/linker.rs
1 parent 153fdcf commit 2fb70e2

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/librustc_trans/back/linker.rs

+15-7
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,12 @@ impl<'a> Linker for MsvcLinker<'a> {
198198
}
199199

200200
fn no_default_libraries(&mut self) {
201-
// TODO: explain noop
201+
// Currently we don't pass the /NODEFAULTLIB flag to the linker on MSVC
202+
// as there's been trouble in the past of linking the C++ standard
203+
// library required by LLVM. This likely needs to happen one day, but
204+
// in general Windows is also a more controlled environment than
205+
// Windows, so it's not necessarily as critical that this be
206+
// implemented.
202207
}
203208

204209
fn include_path(&mut self, path: &Path) {
@@ -233,10 +238,13 @@ impl<'a> Linker for MsvcLinker<'a> {
233238
fn no_whole_archives(&mut self) {
234239
// hints not supported?
235240
}
236-
fn hint_static(&mut self) {
237-
// hints not supported?
238-
}
239-
fn hint_dynamic(&mut self) {
240-
// hints not supported?
241-
}
241+
242+
// On windows static libraries are of the form `foo.lib` and dynamic
243+
// libraries are not linked against directly, but rather through their
244+
// import libraries also called `foo.lib`. As a result there's no
245+
// possibility for a native library to appear both dynamically and
246+
// statically in the same folder so we don't have to worry about hints like
247+
// we do on Unix platforms.
248+
fn hint_static(&mut self) {}
249+
fn hint_dynamic(&mut self) {}
242250
}

0 commit comments

Comments
 (0)