aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-16 13:02:46 -0700
committerGraydon Hoare <[email protected]>2010-08-16 13:02:46 -0700
commit7e62aa68018c94bcfc3fd6beab90cf7b87f91cbf (patch)
treead8091a45871afa2685ec65f6c841fb0c942becf /src/comp
parentEvil solution to the problem of importing the same opaque from two different ... (diff)
downloadrust-7e62aa68018c94bcfc3fd6beab90cf7b87f91cbf.tar.xz
rust-7e62aa68018c94bcfc3fd6beab90cf7b87f91cbf.zip
Absent any deep overhauls to syntax or constant-handling, hack in the ability to project a cexp var binding to a token in the parser. Use it in comp/rustc.rc and comp/lib/llvm.rs.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/lib/llvm.rs2
-rw-r--r--src/comp/rustc.rc18
2 files changed, 18 insertions, 2 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs
index af6a6893..e12108b6 100644
--- a/src/comp/lib/llvm.rs
+++ b/src/comp/lib/llvm.rs
@@ -6,7 +6,7 @@ type LongLong = i64;
type Long = i32;
type Bool = int;
-native mod llvm = "libLLVM-2.7.so" {
+native mod llvm = llvm_lib {
type ModuleRef;
type ContextRef;
diff --git a/src/comp/rustc.rc b/src/comp/rustc.rc
index 87dbc6b4..b61b8022 100644
--- a/src/comp/rustc.rc
+++ b/src/comp/rustc.rc
@@ -14,7 +14,23 @@ mod driver {
}
mod lib {
- mod llvm;
+ alt (target_os) {
+ case ("win32") {
+ let (llvm_lib = "llvm-2.8svn.dll") {
+ mod llvm;
+ }
+ }
+ case ("macos") {
+ let (llvm_lib = "libllvm-2.8svn.dylib") {
+ mod llvm;
+ }
+ }
+ else {
+ let (llvm_lib = "libllvm-2.8svn.so") {
+ mod llvm;
+ }
+ }
+ }
}
// Local Variables: