diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-22 09:28:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-22 09:28:51 -0800 |
| commit | dd9f3ad806029a520a67d911493844c91fff5d1f (patch) | |
| tree | 17058d46fe087c52bcfd42864fda1a518df487fd /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 90f04e1b4da34990df2a4b8e1c521d8f93acb10f (diff) | |
| parent | e6f8edff3734ecfa55159da63343fbea3f1ee3a5 (diff) | |
| download | rust-dd9f3ad806029a520a67d911493844c91fff5d1f.tar.gz rust-dd9f3ad806029a520a67d911493844c91fff5d1f.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index 3242e78ab7e..8d809648aca 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -104,7 +104,7 @@ struct TimeTraceProfiler { impl TimeTraceProfiler { fn new(enabled: bool) -> Self { if enabled { - unsafe { llvm::LLVMTimeTraceProfilerInitialize() } + unsafe { llvm::LLVMRustTimeTraceProfilerInitialize() } } TimeTraceProfiler { enabled } } @@ -113,7 +113,7 @@ impl TimeTraceProfiler { impl Drop for TimeTraceProfiler { fn drop(&mut self) { if self.enabled { - unsafe { llvm::LLVMTimeTraceProfilerFinishThread() } + unsafe { llvm::LLVMRustTimeTraceProfilerFinishThread() } } } } |
