Skip to content

Commit 658ea38

Browse files
committed
rustc_llvm: remove stale references
...that were removed in 77c3bfa.
1 parent 71340ca commit 658ea38

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ config.stamp
9595
keywords.md
9696
lexer.ml
9797
src/etc/dl
98-
src/librustc_llvm/llvmdeps.rs
9998
tmp.*.rs
10099
version.md
101100
version.ml

src/librustc_llvm/ffi.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,13 @@ pub mod debuginfo {
505505

506506
pub enum ModuleBuffer {}
507507

508-
// Link to our native llvm bindings (things that we need to use the C++ api
509-
// for) and because llvm is written in C++ we need to link against libstdc++
510-
//
511-
// You'll probably notice that there is an omission of all LLVM libraries
512-
// from this location. This is because the set of LLVM libraries that we
513-
// link to is mostly defined by LLVM, and the `llvm-config` tool is used to
514-
// figure out the exact set of libraries. To do this, the build system
515-
// generates an llvmdeps.rs file next to this one which will be
516-
// automatically updated whenever LLVM is updated to include an up-to-date
517-
// set of the libraries we need to link to LLVM for.
518-
#[link(name = "rustllvm", kind = "static")] // not quite true but good enough
508+
// This annotation is primarily needed for MSVC where attributes like
509+
// dllimport/dllexport are applied and need to be correct for everything to
510+
// link successfully. The #[link] annotation here says "these symbols are
511+
// included statically" which means that they're all exported with dllexport
512+
// and from the rustc_llvm dynamic library. Otherwise the rustc_trans dynamic
513+
// library would not be able to access these symbols.
514+
#[link(name = "rustllvm", kind = "static")]
519515
extern "C" {
520516
// Create and destroy contexts.
521517
pub fn LLVMContextCreate() -> ContextRef;

0 commit comments

Comments
 (0)