Skip to content

Commit 3bc61c7

Browse files
authored
Unrolled build for rust-lang#118142
Rollup merge of rust-lang#118142 - saethlin:llvm-linkage, r=tmiasko Tighten up link attributes for llvm-wrapper bindings Fixes rust-lang#118084 by moving all of the declarations of symbols from `llvm_rust` into a separate extern block with `#[link(name = "llvm-wrapper", kind = "static")]`. This also renames `LLVMTimeTraceProfiler*` to `LLVMRustTimeTraceProfiler*` because those are functions from `llvm_rust`. r? tmiasko
2 parents 6d2b84b + e6f8edf commit 3bc61c7

File tree

4 files changed

+206
-180
lines changed

4 files changed

+206
-180
lines changed

compiler/rustc_codegen_llvm/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct TimeTraceProfiler {
104104
impl TimeTraceProfiler {
105105
fn new(enabled: bool) -> Self {
106106
if enabled {
107-
unsafe { llvm::LLVMTimeTraceProfilerInitialize() }
107+
unsafe { llvm::LLVMRustTimeTraceProfilerInitialize() }
108108
}
109109
TimeTraceProfiler { enabled }
110110
}
@@ -113,7 +113,7 @@ impl TimeTraceProfiler {
113113
impl Drop for TimeTraceProfiler {
114114
fn drop(&mut self) {
115115
if self.enabled {
116-
unsafe { llvm::LLVMTimeTraceProfilerFinishThread() }
116+
unsafe { llvm::LLVMRustTimeTraceProfilerFinishThread() }
117117
}
118118
}
119119
}

0 commit comments

Comments
 (0)