File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
compiler/rustc_llvm/llvm-wrapper Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -451,14 +451,30 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
451451 Options.ObjectFilenameForDebug = OutputObjFile;
452452 }
453453 if (!strcmp (" zlib" , DebugInfoCompression) && llvm::compression::zlib::isAvailable ()) {
454+ #if LLVM_VERSION_GE(19, 0)
455+ Options.MCOptions .CompressDebugSections = DebugCompressionType::Zlib;
456+ #else
454457 Options.CompressDebugSections = DebugCompressionType::Zlib;
458+ #endif
455459 } else if (!strcmp (" zstd" , DebugInfoCompression) && llvm::compression::zstd::isAvailable ()) {
460+ #if LLVM_VERSION_GE(19, 0)
461+ Options.MCOptions .CompressDebugSections = DebugCompressionType::Zstd;
462+ #else
456463 Options.CompressDebugSections = DebugCompressionType::Zstd;
464+ #endif
457465 } else if (!strcmp (" none" , DebugInfoCompression)) {
466+ #if LLVM_VERSION_GE(19, 0)
467+ Options.MCOptions .CompressDebugSections = DebugCompressionType::None;
468+ #else
458469 Options.CompressDebugSections = DebugCompressionType::None;
470+ #endif
459471 }
460472
473+ #if LLVM_VERSION_GE(19, 0)
474+ Options.MCOptions .X86RelaxRelocations = RelaxELFRelocations;
475+ #else
461476 Options.RelaxELFRelocations = RelaxELFRelocations;
477+ #endif
462478 Options.UseInitArray = UseInitArray;
463479
464480#if LLVM_VERSION_LT(17, 0)
You can’t perform that action at this time.
0 commit comments