diff options
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/base.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs index a9f43880ef6..a6bdbd11899 100644 --- a/compiler/rustc_codegen_llvm/src/base.rs +++ b/compiler/rustc_codegen_llvm/src/base.rs @@ -162,11 +162,13 @@ pub fn compile_codegen_unit( cx.coverageinfo_finalize(); } - // Create the llvm.compiler.used variable - // This variable has type [N x i8*] and is stored in the llvm.metadata section + // Create the llvm.used and llvm.compiler.used variables. if !cx.used_statics().borrow().is_empty() { cx.create_used_variable() } + if !cx.compiler_used_statics().borrow().is_empty() { + cx.create_compiler_used_variable() + } // Finalize debuginfo if cx.sess().opts.debuginfo != DebugInfo::None { |
