]> git.lizzy.rs Git - rust.git/commitdiff
Make sure that -lole32 ends up *after* LLVM libs on the linker command line.
authorVadim Chugunov <vadimcn@gmail.com>
Fri, 24 Mar 2017 17:59:27 +0000 (10:59 -0700)
committerVadim Chugunov <vadimcn@gmail.com>
Thu, 30 Mar 2017 23:31:46 +0000 (16:31 -0700)
src/librustc_llvm/build.rs
src/librustc_llvm/ffi.rs

index 2b945e0a3afaff2f8e7d8ffe10335be2e719bbea..7d5887e699fd7fdb2329291736ca32a7130ec1f6 100644 (file)
@@ -259,4 +259,10 @@ fn main() {
             println!("cargo:rustc-link-lib={}", stdcppname);
         }
     }
+
+    // LLVM requires symbols from this library, but apparently they're not printeds
+    // during llvm-config?
+    if target.contains("windows") {
+        println!("cargo:rustc-link-lib=ole32");
+    }
 }
index 26c7a9166e68e9280ed8a683cc421944d530de60..32c9183ece999ff742f7d33f1dd9b0b92fddda20 100644 (file)
@@ -1662,10 +1662,3 @@ pub fn LLVMRustBuildOperandBundleDef(Name: *const c_char,
     pub fn LLVMRustUnsetComdat(V: ValueRef);
     pub fn LLVMRustSetModulePIELevel(M: ModuleRef);
 }
-
-
-// LLVM requires symbols from this library, but apparently they're not printed
-// during llvm-config?
-#[cfg(windows)]
-#[link(name = "ole32")]
-extern "C" {}