File tree 1 file changed +16
-0
lines changed
compiler/rustc_llvm/llvm-wrapper
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(
451
451
Options.ObjectFilenameForDebug = OutputObjFile;
452
452
}
453
453
if (!strcmp (" zlib" , DebugInfoCompression) && llvm::compression::zlib::isAvailable ()) {
454
+ #if LLVM_VERSION_GE(19, 0)
455
+ Options.MCOptions .CompressDebugSections = DebugCompressionType::Zlib;
456
+ #else
454
457
Options.CompressDebugSections = DebugCompressionType::Zlib;
458
+ #endif
455
459
} else if (!strcmp (" zstd" , DebugInfoCompression) && llvm::compression::zstd::isAvailable ()) {
460
+ #if LLVM_VERSION_GE(19, 0)
461
+ Options.MCOptions .CompressDebugSections = DebugCompressionType::Zstd;
462
+ #else
456
463
Options.CompressDebugSections = DebugCompressionType::Zstd;
464
+ #endif
457
465
} else if (!strcmp (" none" , DebugInfoCompression)) {
466
+ #if LLVM_VERSION_GE(19, 0)
467
+ Options.MCOptions .CompressDebugSections = DebugCompressionType::None;
468
+ #else
458
469
Options.CompressDebugSections = DebugCompressionType::None;
470
+ #endif
459
471
}
460
472
473
+ #if LLVM_VERSION_GE(19, 0)
474
+ Options.MCOptions .X86RelaxRelocations = RelaxELFRelocations;
475
+ #else
461
476
Options.RelaxELFRelocations = RelaxELFRelocations;
477
+ #endif
462
478
Options.UseInitArray = UseInitArray;
463
479
464
480
#if LLVM_VERSION_LT(17, 0)
You can’t perform that action at this time.
0 commit comments