Skip to content

Commit 0f87203

Browse files
committed
Make sure that -lole32 ends up *after* LLVM libs on the linker command line.
1 parent 3b1ba01 commit 0f87203

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/librustc_llvm/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,10 @@ fn main() {
259259
println!("cargo:rustc-link-lib={}", stdcppname);
260260
}
261261
}
262+
263+
// LLVM requires symbols from this library, but apparently they're not printeds
264+
// during llvm-config?
265+
if target.contains("windows") {
266+
println!("cargo:rustc-link-lib=ole32");
267+
}
262268
}

src/librustc_llvm/ffi.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1662,10 +1662,3 @@ extern "C" {
16621662
pub fn LLVMRustUnsetComdat(V: ValueRef);
16631663
pub fn LLVMRustSetModulePIELevel(M: ModuleRef);
16641664
}
1665-
1666-
1667-
// LLVM requires symbols from this library, but apparently they're not printed
1668-
// during llvm-config?
1669-
#[cfg(windows)]
1670-
#[link(name = "ole32")]
1671-
extern "C" {}

0 commit comments

Comments
 (0)