File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ config.stamp
9595keywords.md
9696lexer.ml
9797src /etc /dl
98- src /librustc_llvm /llvmdeps.rs
9998tmp. * .rs
10099version.md
101100version.ml
Original file line number Diff line number Diff line change @@ -505,17 +505,13 @@ pub mod debuginfo {
505505
506506pub 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" ) ]
519515extern "C" {
520516 // Create and destroy contexts.
521517 pub fn LLVMContextCreate ( ) -> ContextRef ;
You can’t perform that action at this time.
0 commit comments