Skip to content

Commit 28d1626

Browse files
committed
Remove the old library names. These were unused since rustboot.
Right now rustc hardcodes -lrustllvm. The idea is to instead remember all the native modules used and convert them to -l directives to the linker. In the case of a library that is installed in an unusual location, Graydon suggested using metadata: native module foo = "bar" { }
1 parent 2ad0954 commit 28d1626

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/comp/lib/llvm.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const uint LLVMRealULT = 12u;
125125
const uint LLVMRealULE = 13u;
126126
const uint LLVMRealUNE = 14u;
127127

128-
native mod llvm = llvm_lib {
128+
native mod llvm = "rustllvm" {
129129

130130
type ModuleRef;
131131
type ContextRef;
@@ -883,9 +883,6 @@ native mod llvm = llvm_lib {
883883
fn LLVMLinkModules(ModuleRef Dest, ModuleRef Src) -> Bool;
884884
}
885885

886-
native mod rustllvm = llvm_lib {
887-
}
888-
889886
/* Slightly more terse object-interface to LLVM's 'builder' functions. For the
890887
* most part, build.Foo() wraps LLVMBuildFoo(), threading the correct
891888
* BuilderRef B into place. A BuilderRef is a cursor-like LLVM value that

src/comp/rustc.rc

+1-17
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,7 @@ auth middle::trans = unsafe;
8080
auth lib::llvm = unsafe;
8181

8282
mod lib {
83-
alt (target_os) {
84-
case ("win32") {
85-
let (llvm_lib = "rustllvm.dll") {
86-
mod llvm;
87-
}
88-
}
89-
case ("macos") {
90-
let (llvm_lib = "librustllvm.dylib") {
91-
mod llvm;
92-
}
93-
}
94-
case (_) {
95-
let (llvm_lib = "librustllvm.so") {
96-
mod llvm;
97-
}
98-
}
99-
}
83+
mod llvm;
10084
}
10185

10286
// Local Variables:

0 commit comments

Comments
 (0)