File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ config.stamp
95
95
keywords.md
96
96
lexer.ml
97
97
src /etc /dl
98
- src /librustc_llvm /llvmdeps.rs
99
98
tmp. * .rs
100
99
version.md
101
100
version.ml
Original file line number Diff line number Diff line change @@ -505,17 +505,13 @@ pub mod debuginfo {
505
505
506
506
pub enum ModuleBuffer { }
507
507
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" ) ]
519
515
extern "C" {
520
516
// Create and destroy contexts.
521
517
pub fn LLVMContextCreate ( ) -> ContextRef ;
You can’t perform that action at this time.
0 commit comments