PassWrapper: update for llvm/llvm-project@a331937197
@rustbot label: +llvm-main
This commit is contained in:
parent
8c9a75b323
commit
ef626d772f
@ -451,14 +451,30 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
|||||||
Options.ObjectFilenameForDebug = OutputObjFile;
|
Options.ObjectFilenameForDebug = OutputObjFile;
|
||||||
}
|
}
|
||||||
if (!strcmp("zlib", DebugInfoCompression) && llvm::compression::zlib::isAvailable()) {
|
if (!strcmp("zlib", DebugInfoCompression) && llvm::compression::zlib::isAvailable()) {
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
Options.MCOptions.CompressDebugSections = DebugCompressionType::Zlib;
|
||||||
|
#else
|
||||||
Options.CompressDebugSections = DebugCompressionType::Zlib;
|
Options.CompressDebugSections = DebugCompressionType::Zlib;
|
||||||
|
#endif
|
||||||
} else if (!strcmp("zstd", DebugInfoCompression) && llvm::compression::zstd::isAvailable()) {
|
} else if (!strcmp("zstd", DebugInfoCompression) && llvm::compression::zstd::isAvailable()) {
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
Options.MCOptions.CompressDebugSections = DebugCompressionType::Zstd;
|
||||||
|
#else
|
||||||
Options.CompressDebugSections = DebugCompressionType::Zstd;
|
Options.CompressDebugSections = DebugCompressionType::Zstd;
|
||||||
|
#endif
|
||||||
} else if (!strcmp("none", DebugInfoCompression)) {
|
} else if (!strcmp("none", DebugInfoCompression)) {
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
Options.MCOptions.CompressDebugSections = DebugCompressionType::None;
|
||||||
|
#else
|
||||||
Options.CompressDebugSections = DebugCompressionType::None;
|
Options.CompressDebugSections = DebugCompressionType::None;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
Options.MCOptions.X86RelaxRelocations = RelaxELFRelocations;
|
||||||
|
#else
|
||||||
Options.RelaxELFRelocations = RelaxELFRelocations;
|
Options.RelaxELFRelocations = RelaxELFRelocations;
|
||||||
|
#endif
|
||||||
Options.UseInitArray = UseInitArray;
|
Options.UseInitArray = UseInitArray;
|
||||||
|
|
||||||
#if LLVM_VERSION_LT(17, 0)
|
#if LLVM_VERSION_LT(17, 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user