Rollup merge of #118142 - saethlin:llvm-linkage, r=tmiasko
Tighten up link attributes for llvm-wrapper bindings Fixes https://github.com/rust-lang/rust/issues/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
This commit is contained in:
@@ -121,7 +121,7 @@ unsafe fn configure_llvm(sess: &Session) {
|
||||
}
|
||||
|
||||
if sess.opts.unstable_opts.llvm_time_trace {
|
||||
llvm::LLVMTimeTraceProfilerInitialize();
|
||||
llvm::LLVMRustTimeTraceProfilerInitialize();
|
||||
}
|
||||
|
||||
rustc_llvm::initialize_available_targets();
|
||||
@@ -132,7 +132,7 @@ unsafe fn configure_llvm(sess: &Session) {
|
||||
pub fn time_trace_profiler_finish(file_name: &Path) {
|
||||
unsafe {
|
||||
let file_name = path_to_c_string(file_name);
|
||||
llvm::LLVMTimeTraceProfilerFinish(file_name.as_ptr());
|
||||
llvm::LLVMRustTimeTraceProfilerFinish(file_name.as_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user